package assi2question1;
import java.lang.*;
import java.util.Scanner;
public class Assi2question1 {
public static void main(String[] args) {
int random, userInput;
userInput = -1;
random = (int)(100.0 * Math.random());
System.out.println(random);
Scanner keyboard = new Scanner(System.in);
System.out.println("Guess an integer number between 0 and 100");
while (random != userInput) {
userInput = keyboard.nextInt();
if (userInput < 0) {
System.out.println(userInput + " is too low. Please enter a number >= 0");
}
else if (userInput > 100) {
System.out.println(userInput + " is too high. Please enter a number <= 100");
}
else if(random != userInput){
System.out.println(userInput + " is not the number I guessed. Guess again.");
}
}
System.out.println("Congratulations, " + random + " is the number I picked.");
}
}