Not quite sure what is wrong with this. I've tried a do-while and a switch as well, but nothing seems to be working. Is there something I'm missing? When the code executes and the user enters Y to continue, it just ends, but I need it to go back to the beginning so that the user can input another grade.
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("Enter your grade: ");
double grade = input.nextDouble();
while (grade >=0 &&grade <=100)
if(grade<=100&&grade>=90)
{
System.out.println("Your grade is an A"); break;
} else if (grade <=89&&grade>=80){
System.out.println("Your grade is a B"); break;
} else if (grade <=79&&grade>=70) {
System.out.println("Your grade is a C"); break;
} else if (grade <=69&&grade>=60) {
System.out.println("Your grade is a D"); break;
} else if (grade <=59) {
System.out.println("Your grade is an F");break;
}
System.out.println("Do you want to continue (Y/N)?");
char check = input.next().charAt(0);
}
}