namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int score=0;
char id = '#';
while(id!='!')
{
score = (int)(Console.Read());
if (score >= 101 || score < 0)
{
Console.Write("error\n");
id = '!';
}
else
if (score <= 100 && score >= 95)
{ Console.Write("优\n"); }
else
if (score < 95 && score >= 80)
{ Console.Write("良\n"); }
else
if (score < 80 && score >= 70)
{ Console.Write("中\n"); }
else
if (score < 70 && score >= 60)
{ Console.Write("及格\n"); }
else
if (score < 60)
{ Console.Write("不及格\n"); }
}
}
}
}
就是总是打出只有“不及格”
追答score =Convert.ToInt32(Console.ReadLine());
追问成功了,求解啊!!!
追答read读1个写符,永远是1位数
本回答被提问者采纳