+ 1
Multiple Inputs
Java: I am making a simple program that has the user try and guess a secret number. What program would I write if I wanted to allow the user to keep guessing if they get it wrong (until they get it right). Thanks!
4 odpowiedzi
+ 2
You would use a while loop to do this.
Format (I don't know what language it is in):
While guess != secretNumber
input guess
+ 1
using scanner to get input you would do,
Scanner input = new Scanner (System.in);
String guess;
while(guess!=secretNumber){
guess = input.next ();
}
0
im what programming language is it?
0
It is in java, sorry!