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