梯数得分循环
{
class Program
{
static void Main(string[] args)
{
while (true)
{
int sum = 0;
for (int i = 1; i <= 100; i++)
{
if (i == 70)
{
Console.WriteLine("跌倒了");
}
if (i<= 49)
{
sum = sum + i;
Console.WriteLine("您"+i+"层的得分为"+sum);
}
else if (i > 49 && a <= 100)
{
sum = sum + 10;
Console.WriteLine(("您"+i+"层的得分为"+sum));
}
else
{
Console.WriteLine("出错");
}
Thread.Sleep(1000);//延时一秒
}
Console.ReadLine();