java旅游项目
简易评分器
public?class?Max?{public?static?void?main(String[]?args)?{
Scanner?in?=?new?Scanner(System.in);
int[]?arr?=?new?int[10];
int?k=0;
double?a=0.0;
double?b=0.0;
for?(int?i?=?0;?i?<?arr.length;?i++)?{
k+=1;
System.out.print("输入第("?+?(i?+?1)?+?")游戏分数:");
arr[i]?=?in.nextInt();
if(arr[i]>80){
a+=1;
}
}
System.out.println("a:"+a);
b=(a/k);
System.out.println("a:"+a);
if(a/10>0.9){
System.out.println("一级");
}else?if(0.6<b&&b<=0.9){
System.out.println("二级");
}else{
System.out.println("继续努力");
}
}
}