-
April 9th, 2007, 02:53 PM
#26
Re: Bagels(fermi,pico,bagels) code help
I may be misunderstanding your problem (if so, I apologize in advance) but the way I see it, you need two separate loops, one nested within the other. The outer loop would allow the user to play multiple games, and the inner loop would allow the user to make multiple guesses within a game. Something like this:
Code:
loop until the user doesn't want to play another game
{
generate a random number
loop until the user guesses the number
{
get guess
evaluate guess
}
ask the user if he wants to play another game
}
Old Unix programmers never die, they just mv to /dev/null
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|