1.if else语句
2.代码实践
3.作业
# include "iostream"
using namespace std;
int main()
{
cout << "欢迎来到黑马动物园。" << endl;
int height;
cout << "请输入你的身高:" << endl;
cin >> height;
if(height > 120)
{
cout << "你的身高超出120cm,游玩需要购票10元。" << endl;
}
else
{
cout << "你的身高未超出120cm,游玩免费。" << endl;
}
cout << "祝您游玩愉快!" << endl;
return 0;
}