import java.util.Random;
import java.util.Scanner;
public class Guess {
public static void main(String[] args) {
Scanner number = new Scanner(System.in);
boolean control = true;
int numberIn = -1;
int randomNumber = new Random().nextInt(100);
while(control){
System.out.println("Enter a number between 0 (zero) and 100 (one hundred): ");
numberIn = number.nextInt();
if(numberIn < randomNumber){
System.out.println("The number is bigger than " + numberIn );
}else if(numberIn > randomNumber){
System.out.println("The number is smaller than " + numberIn);
}else{
control = false;
break;
}
}
System.out.println("Great! you guessed the number! " + numberIn);
}
}