| Author |
Assignment 4b question
|
Gary Ba
Ranch Hand
Joined: Oct 23, 2009
Posts: 150
|
|
Howdy Yall,
I just finished doing assignment #4a and moving on to the next homework. With 4a, there was a pattern on writing the string number 0-99. But with 4b, how can you solve this problem where it is suppose to read 0-billions number??
I tried to see if there is any post about the same problem I am running into. If anyone has an idea, please share.
Garry
|
star chaser..
|
 |
Carol Murphy
village idiot
Bartender
Joined: Mar 15, 2001
Posts: 1172
|
|
By creating and/or extending a pattern that will accommodate numbers up to a billion.
|
 |
Gary Ba
Ranch Hand
Joined: Oct 23, 2009
Posts: 150
|
|
Argh! This can be done in 40 lines of code. I'm looking for a start. As of now, I do not know how to even start the code with this assignment.
Garry
|
 |
Carol Murphy
village idiot
Bartender
Joined: Mar 15, 2001
Posts: 1172
|
|
|
Try writing it out in pseudo code. Building off of your work for 4a, what needs to be changed/done completely new to accommodate the higher numbers? What is different when you get to one hundred? One thousand? Take it one step at a time and see if a plan makes itself apparent to you.
|
 |
Katrina Owen
Sheriff
Joined: Nov 03, 2006
Posts: 1334
|
|
Also don't worry about how many lines of code it takes.
Make it work first, then work on making the solution more elegant.
|
 |
Gary Ba
Ranch Hand
Joined: Oct 23, 2009
Posts: 150
|
|
Its 3am here and I just finished assignment 4b Say. It's working and I tried to make the code easy to read Well see what my nitpicker say.
|
 |
 |
|
|
subject: Assignment 4b question
|
|
|