美文网首页
第四节课的第三个作业

第四节课的第三个作业

作者: zjh666 | 来源:发表于2018-10-31 20:27 被阅读0次

#编码

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

string str_chinese = Console.ReadLine();      // 输入成绩

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

string str_music = Console.ReadLine();          // 输入成绩

int chinese = Convert.ToInt32(str_chinese);      //类型转换

int music = Convert.ToInt32(str_music);

bool b = chinese > 90 && music > 80;      //判断是否

if (b)

{

Console.WriteLine("奖励100元");      //if判断

}

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

if (c)

{

Console.WriteLine("奖励100元");      //if判断

}

Console.WriteLine("程序到此结束");

Console.ReadKey();

#效果

相关文章

网友评论

      本文标题:第四节课的第三个作业

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