作业帮 > 综合 > 作业

出错了,为什么?Console.WriteLine("请输入成绩");int cj = Convert.ToInt32(

来源:学生作业帮 编辑:拍题作业网作业帮 分类:综合作业 时间:2024/04/29 14:43:13
出错了,为什么?
Console.WriteLine("请输入成绩");
int cj = Convert.ToInt32(Console.ReadLine());
if (cj>=90)
{
Console.WriteLine("等级为A");
}
if (90 > cj >= 80)
{
Console.WriteLine("等级为B");
}
if (80 > cj >= 70)
{
Console.WriteLine("等级为C");
}
if (70 > cj >= 60)
{
Console.WriteLine("等级为D");
}
if (cj < 60)
{
Console.WriteLine("等级为E");
}
Console.ReadKey();
if (90 > cj >= 80)
编程里面没有这种连比较的数学符号 的.
要拆开写.
if (90 > cj && cj>= 80) 用&&来连接 .并且的意思.