Created
May 24, 2017 05:06
-
-
Save peter279k/2f2948f08016d024c4ff2d59dbbee017 to your computer and use it in GitHub Desktop.
TQC+ JAVA
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
import java.util.*; | |
class JPA02 { | |
static Scanner keyboard = new Scanner(System.in); | |
public static void main(String[] args) { | |
test(); | |
test(); | |
test(); | |
test(); | |
test(); | |
} | |
public static void test() { | |
System.out.println("Input:"); | |
int score = keyboard.nextInt(); | |
if(score >= 90) { | |
System.out.println("Your grade is A"); | |
} else if(score < 90 && score >= 80) { | |
System.out.println("Your grade is B"); | |
} else if(score < 80 && score >= 70) { | |
System.out.println("Your grade is C"); | |
} else if(score < 70 && score >= 60) { | |
System.out.println("Your grade is D"); | |
} else { | |
System.out.println("Your grade is F"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment