2018-10-31

2018-11-01  本文已影响0人  BlingBling007

/**

            *

            * 让用户输入苏小鬼的语文和数学成绩,输出以下判断是否正确,正确输出True,错误输出False

            * 语文和数学有一门是大于90分的

            **/

            Console.WriteLine("请输入老苏的语文成绩");

            string str_chinese = Console.ReadLine();

            int chinese = Convert.ToInt32(str_chinese);

            Console.WriteLine("请输入老苏的数学成绩");

            string str_math = Console.ReadLine();

            int math = Convert.ToInt32(str_math);

            bool b = chinese > 90 || math > 90;

            Console.WriteLine("语文和数学是否有一门大于90分,{0}", b);

            Console.ReadKey();

上一篇 下一篇

猜你喜欢

热点阅读