5607怎么错了?????????????????????

lixinyan 爱因斯坦 2024-01-17 12:33:17 2024-01-17 12:33:46 1

#include

using namespace std;

int main() {

float x, y, z, a, b;

cin >> x >> y >> z;

a = max((x, y), z);

b = min((x, y), z);

cout << b << " " << x + y + z - a - b << " " << a;

return 0;

}

{{ vote && vote.total.up }}

共 2 条回复

root 站长

b = min(min(x, y), z);

root 站长

思路不错, a = max((x, y), z); 改成 a = max(max(x, y), z);