美文网首页
2018-10-31(2)

2018-10-31(2)

作者: 一只皮皮橙 | 来源:发表于2018-10-31 21:43 被阅读0次

/**

*

* 让用户输入苏小鬼的语文和数学成绩,输出以下判断是否正确,正确输出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();

相关文章

网友评论

      本文标题:2018-10-31(2)

      本文链接:https://www.haomeiwen.com/subject/bxpztqtx.html