算法1
(max函数)
C++ 代码
# include <iostream>
using namespace std;
int main()
{
int a, b, c, x, y, z;
scanf("%d%d%d", &a, &b, &c);
x = min(a, min(b, c)), z = max(a, max(b, c)), y = a + b + c - x - z;
printf("%d\n%d\n%d\n\n%d\n%d\n%d", x, y, z, a, b, c);
}