#include<iostream>
using namespace std;
int main()
{
int score = 0;
cout << "输入分数" << endl;
cin >> score;
cout << "考了" << score << endl;;
if (score < 500) //这个if不能加分号,因为会让后面的无论什么样都会输出
{
cout << "你个菜狗" << endl;
}
if (score >600)
{
cout << "牛啊牛啊!" << endl;
}
system("pause");
return 0;
}
P24-选择结构-单行if
最新推荐文章于 2024-01-01 23:09:46 发布