import java.util.Scanner;标签:scanner,struct,System,else,循环,println,score,out From: https://www.cnblogs.com/123jgh/p/16785013.html
public class Demo01 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("请输入成绩:");
int score = scanner.nextInt();
//equals:判断字符串是否相等
/*
String s = scanner.nextLine();
if(s.equals("hello")){}
*/
if (score==100){
System.out.println("满分");
}else if (score<100 && score>80){
System.out.println("A");
}else if (score<80 && score>60){
System.out.println("B");
}else if (score<60 && score>=0){
System.out.println("不及格");
}else{
System.out.println("成绩不合法");
}
scanner.close();
}
}