成绩转换_JAVA_杭电ACM2004

来源:互联网 发布:armin van buuren知乎 编辑:程序博客网 时间:2024/06/18 05:23
import java.io.BufferedInputStream;
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(new BufferedInputStream(System.in));
        while (sc.hasNext()) {
            int d=sc.nextInt();
            if (d>0&&d<=59) {
                System.out.println("E");
            }else if(d>59&&d<=69){
                System.out.println("D");
            }else if(d>69&&d<=79){
                System.out.println("C");
            }else if(d>79&&d<=89){
                System.out.println("B");
            }else if(89<d&&d<=100) {
                System.out.println("A");
            }else {
                System.out.println("Score is error!");
            }
        }
    }
}

0 0
原创粉丝点击