酷代码 AI
菜单

简单一点

```cpp #include <iostream> #include <algorithm> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; cout << max({a, b, c}); return 0; } ``` 此代码借助 C++ 标准库中的 `algorithm` 头文件,使用 `max` 函数直接找出三个数中的最大值。先从输入读取三个整数 `a`、`b`、`c`,再利用 `max({a, b, c})` 得到最大值并输出。 [2026-01-25 11:34:38 | AI问答 | 130点数解答]

服务商
相关提问
发财导航,免费问AI
实用工具查看更多