2018-10-31(2)

/**

*

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

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 作业要求 代码 ...namespace _2{class Program{static void Main(st...
    wlp小迷妹阅读 1,018评论 0 0
  • 五、 加加减减和复合赋值运算符 (一) 描述 自加(++)、自减(--)运算符是一元运算符,它们的作用是使变量的值...
    晨颜阅读 3,229评论 0 0
  • 运算符 忠告:多练才是王道 清明时节雨纷纷,狠敲代码有大奔 中秋佳节倍思亲,狂敲代码拿年薪 知识点 一、 算数运算...
    c592a8530dfe阅读 3,762评论 0 0
  • usingSystem; usingSystem.Collections.Generic; usingSystem...
    一只皮皮橙阅读 1,670评论 0 0
  • usingSystem; usingSystem.Collections.Generic; usingSystem...
    一只皮皮橙阅读 2,726评论 0 0

友情链接更多精彩内容