package com.company;
import java.util.Scanner;
public class youxijinji {
public static void main(String[] args) {
System.out.println("迷你游戏平台 > 游戏晋级");
int count =0 ;
boolean flag =false;
Scanner scanner =new Scanner(System.in);
for (int i =0 ; i <5 ; i ++ ) {
System.out.println("您正在玩" + ( i +1 +"成绩为:"));
int score = scanner.nextInt();
if ( score >=80 ){
count ++;
}
String shifou ="";
if ( i <4 ) {
System.out.println("继续玩下一局?(y/n)");
shifou = scanner.next();
}
if ("no".equals(shifou) ) {
break;
}
if ( i <4 ) {
System.out.println("进入下一局");
shifou = scanner.next();
}
if (i<4);
flag =false;
break;
}
System.out.println("游戏结束");
if ( !flag ) {
int youxiLv = count /5;
if (youxiLv >=0.8) {
System.out.println(" 恭喜,一级通过");
}else if (youxiLv >=0.6){
System.out.println(" 恭喜,二级通过");
}else {
System.out.println("太菜了,");
}
}
}
}