2018-11-29
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication7
{
class Program
{
static void Main(string[] args)
{
int n = 1;
int count = 0;
Console.WriteLine("魔法师迷你游戏平台>游戏晋级");
do
{
Console.WriteLine("您正在玩第{0}局,成绩为:", n);
int score=Convert.ToInt32( Console.ReadLine());
if (score > 80)
{
count++;
}
n++;
if (n > 5)
{
Console.WriteLine("游戏结束");
if (count == 5)
{
Console.WriteLine("恭喜,通过一级");
}
else if (count == 4)
{
Console.WriteLine("恭喜,通过二级");
}
else
{
Console.WriteLine("对不起,你未能晋级,继续加油吧");
}
}
else
{
Console.WriteLine("继续玩下一局吗?(yes/no)");
string answer = Console.ReadLine();
if (answer == "no")
{
Console.WriteLine("您已中途退出程序");
Console.WriteLine("对不起,你未能完成游戏,不能晋级,继续加油努力");
break;
}
else
{
Console.WriteLine("进入下一局");
}
}
} while (n <= 5);
Console.ReadKey();
}
}
}