美文网首页
2018-10-31

2018-10-31

作者: 大长腿快快跑 | 来源:发表于2018-10-31 15:34 被阅读0次

作业1:如果老苏的(chinese music)
语文成绩大于90并且音乐成绩大于80
语文成绩等于100并且音乐成绩大于70,则奖励100元.
Console.WriteLine("请输入你的语文成绩:");
int chinese = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("请输入你的音乐成绩:");
int music = Convert.ToInt32(Console.ReadLine());
bool b = chinese > 90 && music > 80;
bool c = chinese == 100 && music > 70;
if (b)
{
Console.WriteLine("奖励100元");
}
if(c)
{
Console.WriteLine("奖励100元");
}
Console.ReadKey();

相关文章

网友评论

      本文标题:2018-10-31

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