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

乌云相遇闪电类型预测的C++代码实现

```cpp #include <iostream> using namespace std; int main() { int m, n; // 输入黑色云数量m和灰色云数量n cin >> m >> n; if (m > n) { cout << "yellow lightning" << endl; if (m >= 2 * n) { cout << "and red lightning." << endl; } } else if (n > m) { cout << "blue lightning" << endl; if (n >= 2 * m) { cout << "and purple lightning." << endl; } } else { cout << "white lightning." << endl; } return 0; } ``` ######[AI问答 | 188点数解答 | 2026-06-21 20:32:53]

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