0

using a while loop create a guessing game program that keeps asking the user to enter a number until the user enters the number 7. You will need to create and initialise an int variable to zero. You can then use this variable as the condition in your while loop ( while the number is not equal to seven) Then in the while loop ask the user to enter a number and store the number entered in the number variable that is in the conditions of your loop.

please help me with this.

8th Jul 2016, 5:12 AM
Adrian Lupu
Adrian Lupu - avatar
1 Odpowiedź
+ 3
... int number=0; while (number != 7) { Console.Write("Guess the number: "); number= Convert.ToInt32(Console.ReadLine()); }
8th Jul 2016, 3:47 PM
Albert Gullbee