酷代码 AI
菜单
服务商
DeepSeek字节豆包讯飞星火
更多选项

C++实现博物馆门票年龄分段计费程序

```cpp #include <iostream> using namespace std; int main() { int age; cin >> age; if (age >= 0 && age <= 6) { cout << 0 << endl; } else if (age > 6 && age <= 18) { cout << 20 << endl; } else if (age > 18 && age <= 22) { cout << 25 << endl; } else if (age >= 60) { cout << 30 << endl; } else { cout << 60 << endl; } return 0; } ``` ######[AI问答 | 151点数解答 | 2026-04-24 22:12:58]

相关提问
本站限时免费提问中
实用工具查看更多
Linux在线手册 [开发类]
Jquery在线手册 [开发类]
今日油价 [生活类]
图片互转base64 [开发类]
时间转换器 [开发类]