package com.wang.Struct;
import java.util.Scanner;
public class Struct01 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("请输入分数:");
int score = scanner.nextInt();
if (score > 60 ) {
System.out.println("及格");
}else{
System.out.println("不及格");
}
scanner.close();
}
}
package com.wang.Struct;
import java.util.Scanner;
public class Struct02 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("请输入分数:");
int score = scanner.nextInt();
if (score > 95) {
System.out.println("优秀");
}else if (score < 95 && score > 80 ){
System.out.println("良");
}else if(score < 80 && score > 60 ){
System.out.println("中");
}else {
System.out.println("不及格");
}
scanner.close();
}
}