- import java.util.Scanner;
- public class JPA01 {
- static Scanner o= new Scanner(System.in);
- public static void main(String[] args) {
- // TODO 自動產生的方法 Stub
-
- test();
- test();
- test();
- test();
- test();
- }
-
-
- private static void test() {
- // TODO 自動產生的方法 Stub
-
-
-
- System.out.print("Input score:");
- int c = o.nextInt();
-
-
- if(c>=90)
- {
- System.out.println("Your grade is A");
- }
- if(c>=80)
- {
- System.out.println("Your grade is B");
- }
-
- if(c>=70)
- {
- System.out.println("Your grade is C");
- }
- if(c>=60)
- {
- System.out.println("Your grade is D");
- }
- if(c<60)
- {
- System.out.println("Your grade is F");
- }
-
- }
-
- }
複製代碼 |