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

乌云碰撞闪电预测:根据黑灰云数量编写程序判断闪电类型

```cpp #include <iostream> using namespace std; int main() { int m, n; cin >> m >> n; if (m > n) { if (m >= 2 * n) { cout << "yellow lightning" << endl; cout << "and red lightning" << endl; } else { cout << "yellow lightning." << endl; } } else if (n > m) { if (n >= 2 * m) { cout << "blue lightning" << endl; cout << "and purple lightning" << endl; } else { cout << "blue lightning." << endl; } } else { cout << "white lightning." << endl; } return 0; } ``` ######[AI问答 | 165点数解答 | 2025-12-28 14:56:06]

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