降序排列#include void main(){int a,b,c,d,t;printf("请输入4个数:");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(a>d){t=a;a=d;d=t;}if(b>c){t=b;b=c;c=t;}if(b>d){t=b;b=d;d=t;}if(c>d){t=c;c=d;d=t;}printf("%d

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/28 08:40:20
降序排列#include void main(){int a,b,c,d,t;printf(b){t=a;a=b;b=t;}if(a>c){t=a;a=c;c=t;}if(a>d){t=a;a=d;d=t;}if(b>c){t=b;b=c;c=t;}if(b>d){t=b;b=d;d=t;}if(c>d){t=c;c=d;d=t;}printf("%d" />
x咱J@_e$$M.;4xMTlTPDQl [&YY3;?_Rf_j}yݜ:8}X"/¨΋ L1d/m= 9}|{\>y_(QL  $ TY(2U*H%iOQqqc/Jٍtvةuh9[Wdy]oǠ,tD LŊfe6Zv`K2Mmӊ$Lk6Ѹ̒_6+70A`d|`/٪=7PAPPAPPAP(oc>

降序排列#include void main(){int a,b,c,d,t;printf("请输入4个数:");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(a>d){t=a;a=d;d=t;}if(b>c){t=b;b=c;c=t;}if(b>d){t=b;b=d;d=t;}if(c>d){t=c;c=d;d=t;}printf("%d
降序排列
#include
void main()
{
int a,b,c,d,t;
printf("请输入4个数:");
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(a>d)
{t=a;a=d;d=t;}
if(b>c)
{t=b;b=c;c=t;}
if(b>d)
{t=b;b=d;d=t;}
if(c>d)
{t=c;c=d;d=t;}
printf("%d

降序排列#include void main(){int a,b,c,d,t;printf("请输入4个数:");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(a>d){t=a;a=d;d=t;}if(b>c){t=b;b=c;c=t;}if(b>d){t=b;b=d;d=t;}if(c>d){t=c;c=d;d=t;}printf("%d
#include
void main()
{
int a,b,c,d,t;
printf("请输入4个数:");
scanf("%d,%d,%d",&a,&b,&c);//scanf("%a,%b,%c,%d",&a,&b,&c,&d);没写入d
if(a>b)
{t=a;a=b;b=t;}
if(a>c)
{t=a;a=c;c=t;}
if(a>d)
{t=a;a=d;d=t;}
if(b>c)
{t=b;b=c;c=t;}
if(b>d)
{t=b;b=d;d=t;}
if(c>d)
{t=c;c=d;d=t;}
printf("%d