#编码
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();
#效果



网友评论