class aaa
{
static void Main(string[] args)
{
int a;
int k=0;
chc cc = new chc();
while (true)
{
Console.WriteLine("Please Input A Num:");
a = int.Parse(Console.ReadLine());
k = cc.chnum(a);
switch (k)
{
case 1:
Console.WriteLine("优");
break;
case 2:
Console.WriteLine("良");
break;
case 3:
Console.WriteLine("合格");
break;
default:
Console.WriteLine("不合格");
break;
};
}
}
}
class chc
{
public int chnum(int n)
{
if (n >= 90)
return 1;
else if (n >= 80 && n < 90)
return 2;
else if (n >= 60 && n < 80)
return 3;
else
return 4;
}
}