Console.WriteLine("请输入老苏语文成绩:"); string str_chinese = Console.ReadLine(); Console.WriteLine("请输入老苏音乐成绩:"); string str_music = Console.ReadLine(); int chinese = Convert.ToInt32(str_chinese); int music = Convert.ToInt32(str_music); bool b = chinese > 90 && music > 80; if (b) { Console.WriteLine("奖励100元"); } bool c = chinese == 100 && music > 70; if (c) { Console.WriteLine("奖励100元"); } Console.WriteLine("程序到此结束"); Console.ReadKey();
网友评论