4.1.2多行if语句
#include <iostream>
using namespace std;
int main()
{
int sore = 0;
cout << "shuru:" << endl;
cin >> sore;
if (sore >= 600)
{
cout << "neng" << endl;
}
else if (sore > 500)
{
cout << "ffff" << endl;
}
else
{
cout << "buneng" << endl;
}
system("pause");
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int a = 0;
cout << "输入:" << endl;
cin >> a;
if (a >= 600)
{
cout << "sssss";
}
//if条件后不加分号
system("pause");
return 0;
}