对学员的考试成绩测评
成绩>=90:A
90>成绩>=80:B
80>成绩>=70:C
70>成绩>=60:D
成绩<60:E
第一种 if做法
Console.WriteLine("请输入学员的考试成绩");//提示学员输入考试成绩
int score = int.Parse(Console.ReadLine());//接收用户输入并转换成int类型
if (score >= 90)
{
Console.WriteLine("A");
}
if (score < 90 && score >= 80)
{
Console.WriteLine("B");
}
if (score < 80 && score >= 70)
{
Console.WriteLine("C");
}
if (score < 70 && score >= 60)
{
Console.WriteLine("D");
}
if (score < 60