Nov 8, 2011 at 12:51am UTC
What is the value of user2 when your program tries to enter the loop?
Nov 8, 2011 at 2:13am UTC
before the second loop you should give a value to the user2 param.
Nov 8, 2011 at 2:31am UTC
what you mean i gave the user2 a value of 0 before the loop and i ask the user if he wants to play again if he enters y or Y it re-enters the loop again those 5 rand generated problems.. if enter n or N it exits the program.
Nov 8, 2011 at 3:09am UTC
I might be really tired but the do-while loops does not look right..
it is:
do
{
do.stuff.in.here
}while(answer != 3)
The end part of the code is not even in a loop. You ask the person if he/she want to go again, and that's that. There is no loop there.
do
{
question
}while(answer != 'n')
Can be wrong, reeaall tired ^^
Nov 8, 2011 at 11:46am UTC
heymrjack10 wrote: i gave the user2 a value of 0 before the loop
If user2 has the value 0 before the loop then it won't be equal to 'y' or 'Y' will it? Therefore it will never enter the loop.
Last edited on Nov 8, 2011 at 11:46am UTC