发布网友 发布时间:2022-04-23 08:54
共2个回答
热心网友 时间:2023-10-08 23:14
public class score {
public static void main(String[] args) {
for (int i = 0; i < 5; i++) {
int score = (int) (Math.random() * 101); // [0,100]
System.out.println("分数是:" + score);
score /= 10;
if (score < 6)
score = 0;
switch (score) {
case 0:
System.out.println("不及格");
break;
case 6:
System.out.println("及格");
break;
case 7:
System.out.println("良好");
break;
case 8:
System.out.println("优秀");
break;
case 9:
System.out.println("天秀");
break;
case 10:
System.out.println("蒂花之秀");
break;
default:
break;
热心网友 时间:2023-10-08 23:15
fas af