输入3个整数,从小到大排序后输出。
样例输入:
20 7 33
样例输出:
7 20 33
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a,b,c,temp;
scanf("%d %d %d",&a,&b,&c);
if(a>b){
temp = a;
a = b;
b = temp;
}
if(a>c){
temp = a;
a = c;
c = temp;
}
if(b>c){
temp = b;
b = c;
c =temp;
}
printf("%d%d%d",c,b,a);
return 0;
}