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