import java.util.Scanner;public class yfc {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("请输入分数:");
double score = scanner.nextDouble();
scanner.close();
if (score < 0 || score > 100) {
System.out.println("输入的分数不在0-100之间,不符合要求");
} else if (score >= 90) {
System.out.println("A");
} else if (score >= 80) {
System.out.println("B");
} else if (score >= 60) {
System.out.println("C");
} else {
System.out.println("D");
}
}
}
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("请输入分数:");
double score = scanner.nextDouble();
scanner.close();
if (score < 0 || score > 100) {
System.out.println("输入的分数不在0-100之间,不符合要求");
} else if (score >= 90) {
System.out.println("A");
} else if (score >= 80) {
System.out.println("B");
} else if (score >= 60) {
System.out.println("C");
} else {
System.out.println("D");
}
}
}
Scanner scan = new Scanner(System.in);
while(scan.hasNext()){
int score = scan.nextInt();
String str = score < 60 ? "C" : (score < 90 ? "B" : "A");
System.out.println(str);
}
}
Scanner scan = new Scanner(System.in);
while(scan.hasNext()){
int score = scan.nextInt();
String str = score < 60 ? "C" : (score < 90 ? "B" : "A");
System.out.println(str);
}
}