上传文件至 /

This commit is contained in:
2026-03-20 09:32:14 +08:00
parent 4ae70d5c2e
commit 5d108b8dba
4 changed files with 126 additions and 0 deletions

23
javaclass2.java Normal file
View File

@@ -0,0 +1,23 @@
import java.util.Scanner;
class ScoreToGrade
{
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
int i_score;
System.out.print("请输入分数 = ");
i_score = scan.nextInt();
i_score /=10;
switch(i_score)
{
case 10:
case 9:System.out.println("成绩为 优秀 !"); break;
case 8:System.out.println("成绩为 良好 !"); break;
case 7:System.out.println("成绩为 中等 !"); break;
case 6:System.out.println("成绩为 及格 !"); break;
default:System.out.println("成绩为 不及格 !");
}
}
}