I keep getting else without if. Any ideas why? Thanks all. By the way i’m a student so please bear with me.
public class QuizGrading
{
public static void main (String [] args)
{
int grade = 100;
Scanner in = new Scanner (System.in);
grade.input.in.nextlnt();
{
System.out.print("Please enter grade");
}
if (grade >= 90)
{
System.out.println("You have been graded A");
}
else if (grade <= 80 && >= 89)
{
System.out.println("You have been graded B");
}
}
}
Assign the in varible into grade variable and change the inside of if condition with grade variable. It will be helpful if you see online java tutorials.