Created
October 16, 2017 17:04
-
-
Save PocasPedro/e3e3ae5a7fb76afab856feac4ec36bc7 to your computer and use it in GitHub Desktop.
Java Fundamentals for Kids - Exercise 9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Program description | |
*/ | |
public class Grades { | |
public static void main(String[] args) { | |
double grade = 7.5; | |
if(grade<0){ | |
System.out.println("Error"); | |
}else{ | |
if(grade<5){ | |
System.out.println("Your grade is F"); | |
}else{ | |
if(grade<5.5){ | |
System.out.println("Your grade is C"); | |
}else{ | |
if(grade<6){ | |
System.out.println("Your grade is B-"); | |
}else{ | |
if(grade<7){ | |
System.out.println("Your grade is B"); | |
}else{ | |
if(grade<9){ | |
System.out.println("Your grade is B+"); | |
}else{ | |
if(grade<=9.9){ | |
System.out.println("Your grade is A"); | |
}else{ | |
if(grade==10){ | |
System.out.println("Your grade is A+"); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
/**
Program description
*/
public class Grades {
}