PHP
·
发表于 5年以前
·
阅读量:8295
#include <stdio.h>
int main() {
int min, mid, max, t;
scanf("%d%d%d", &min, &mid, &max);
if (min > mid) {
t = min;
min = mid;
mid = t;
}
if (min > max) {
t = min;
min = max;
max = t;
}
if (mid > max) {
t = mid;
mid = max;
max = t;
}
printf("%d %d %d", min, mid, max);
return 0;
}