利用if else判断是否及格

static void Main(string[] args)
        {
            while (true)
            {
                string a; int b;
                Console.Write("请输入您的姓名:");
                a = Console.ReadLine();
                Console.Write("请输入您的分数:");
                b = Convert.ToInt32(Console.ReadLine());
                if (b >60 &&b<100)
                {
                    Console.WriteLine("恭喜你,及格了");
                    if (b > 80)
                    {
                        Console.WriteLine("你学的不错,值得表扬");
                    }
                    else
                    {
                        Console.WriteLine("刚刚及格,不要骄傲");
                    }
                }

else if (b > 50 && b < 60)
                {
                    Console.WriteLine("就差一点点,在加把劲");
                }
                else if(b>0&&b<50)
                {
                    Console.WriteLine("使劲努力,不要偷懒");

}
                else
                {
                    Console.WriteLine("请输入正确的分数");
                }
               
               
               
               
               
               
               
                Console.ReadLine();
            }

上一篇:PCB MS SQL 排序应用---SQL相邻数据区间值求解


下一篇:MS SQL Server中数据表、视图、函数/方法、存储过程是否存在判断及创建