You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
int number = (int)(Math.random()*100) + 1; // Math.random() generate a pseudorandom double value that is greater than or equal to 0.0 and less than 1.0. We add +1 to have numbers between 0-100
int guess = 0;
System.out.println("Number Guessing Game\n");
while (guess != number){
System.out.print("Enter your guess between 1 and 100: ");