Answer:
import java.util.Random;
import java.util.Scanner;
public class ANot {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
Random rand = new Random();
int randomNum = rand.nextInt(100)+1;
System.out.println("ENTER A NUMBER TO PLAY");
int userNum = in.nextInt();
if(userNum<randomNum){
System.out.println("Guess Higher");
}
else if(userNum>randomNum){
System.out.println("Guess Lower");
}
else{
System.out.println("CORRECT GUESS");
}
}
}
Explanation: