参考资料:https://blog.csdn.net/qq_41562665/article/details/80602719
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
int main() {
int a = 0;
int b = 0;
int c = 0;
int tmp = 0;
printf("请输入3个整数:\n");
scanf("%d%d%d", &a,&b,&c);
if (a < b) {
tmp = b;
b = a;
a = tmp;
}
if (a < c) {
tmp = c;
c = a;
a = tmp;
}
if (b < c) {
tmp = c;
c = b;
b = tmp;
}
printf("%d %d %d\n", a,b,c);
system("pause");
return 0;
}