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

2018-10-31(2)

作者: BlingBling007 | 来源:发表于2018-11-01 22:17 被阅读0次

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace 运算符2

{

class Program

{

static void Main(string[] args)

{

/**

* 语文成绩大于90并且音乐成绩大于80,true

* 语文成绩等于100并且音乐成绩大于70,则奖励100元.

*

* */

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

string str_chinese = Console.ReadLine();

int chinese = Convert.ToInt32(str_chinese);

Console.WriteLine("请输入老苏的音乐成绩");

string str_music = Console.ReadLine();

int music = Convert.ToInt32(str_music);

bool b= chinese > 90 && music > 80;

Console.WriteLine("语文成绩是否大于90并且音乐成绩是否大于80,{0}", b);

bool c = chinese == 100 && music > 70;

if (c)

{

Console.WriteLine("恭喜你拿到100元奖金");

}

Console.ReadKey();

}

}

}

相关文章

网友评论

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

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