Hi, I am having a hard time determining what the problem is with my codes. I have started over multiple times and I am getting at least 12 error messages. I am a beginner so this appears to be difficult. My assignment is to design & implement an application that plays the Hi-Lo guessing game with numbers (between 1 & 100) then repeatedly prompt the user to guess the number. I have used an online template to get what I have and this is what I have so far...
[code=Java]
import java.util.Scanner;
import java.util.Random;
public class HiLoGuess {
public static void main(String[] args) {
// TODO Auto-generated method stub
}
Scanner input = new Scanner(System.in);
Random rand = new Random();
int number = rand.nextInt(100) + 1;
int guess;
private Scanner scan;
System.out.println("Guess a number between 1 and 100");
guess = scan.nextInt();
while (guess < number) {
System.out.println("Higher!");
guess = scan.nextInt();
}
while (guess > number) {
System.out.println("Lower!");
guess = scan.nextInt();
}
while (guess == number) {
System.out.println("Correct!");
break;
}
}
}
}