I'm having problems with the if then statemenT. I'm making a program that will tell the user the grade if he enters a integer, ex A if he gets 100. The problem with this program is that if I input 50, It will print both the F and D mark. I have a feeling its my bracket that are the culprit. If you can help, it would be great.
import java.util.Scanner;
public class LoanQualificationProgram{
public static void main(String[] args){
Scanner keyboard = new Scanner(System.in);
int grade;
grade = keyboard.nextInt();
if (grade >=80)
System.out.println("Your grade is an A");
else {
if (grade >=70)
System.out.println("Your grade is B");
else {
if (grade>=60)
System.out.println("your grade is a C");
else {
if (grade >=50)
System.out.println("your grade is a D");
if (grade >=0)
System.out.println("your grade is an F");
}
}
}