资源描述
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
float score;
loop: Console.WriteLine("请输入学生成绩");
score = float.Parse(Console.ReadLine());
if ((score < 0) || (score > 100))
{
Console.WriteLine("你输入的成绩不对,选择是(Y)退出还是继续(N)");
string book = Console.ReadLine();
if (book == "N")
{
goto loop;
}
else
{
Console.WriteLine("程序退出");
}
}
else
{
if(score>=60)
{
if(score>=70)
{
if(score>=80)
{
if(score>=90)
{
Console.WriteLine("90分以上");
goto loop;
}
else
{
Console.WriteLine("80---90");
goto loop;
}
}
else
{
Console.WriteLine("70---80");
goto loop;
}
}
else
{
Console.WriteLine("60---70");
goto loop;
}
}
else
{
Console.WriteLine("不及格");
goto loop;
}
}
Console.ReadKey();
}
}
}
展开阅读全文