if后执行多条语句的用法-简单的排序

来源:互联网 发布:淘宝买家皇冠怎么来的 编辑:程序博客网 时间:2024/06/08 02:21

简单的排序,找茬,修改后,可运行

#include<stdio.h>
#include<stdlib.h>
int main()
{
int a,b,c,t;
scanf("%d %d %d",&a,b,b);
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("%d%d%d",a,b,c);
system("pause");
return 0;
}

0 0