import java.util.Scanner;
class Text_if {
public static void main(String[] args) {
/*int sum = 11;
int a=0;
int i;
if((sum%2)==0){
System.out.println("sum是偶数");
}else{
System.out.println("sum是奇数");
}
for(i=2;i<(sum/2);i++){
if((sum%i)==0)
a++;
}
if(a==0){
System.out.println("sum是素数");
}
System.out.println("Hello World!");
*/
Scanner sc = new Scanner(System.in);
int sum = sc.nextInt();
if ((sum>100)&&(sum<0)) {
System.out.println("输入错误");
}
if(sum>=90){
System.out.println("优秀");
}
else if(sum>=80){
System.out.println("良好");
}
else if (sum>=70) {
System.out.println("中");
}
else if (sum>=60) {
System.out.println("及格");
}
else{
System.out.println("不合格");
}
}
}
|
|