3个数排序


#include<stdio.h>
main()

{
int a,b,c,t;
printf("please input a,b,c:\n");
scanf("%d%d%d",&a,&b,&c);
if(a>b)
{
t=a;
a=b;
b=t;
}
if(a>c)
{
t=a;
a=c;
c=t;
}
if(b>c)
{
t=b;
b=c;
c=t;
}
printf("the order ofteh number is:\n");
printf("%d%d%d",a,b,c);
}

 

posted @ 2016-09-12 18:06  魔都初心  阅读(137)  评论(0编辑  收藏  举报