輸入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;
}