#include <stdio.h> /* 有三个数a,b,c要求按大小顺序将其输出 ----------soulsjie 20170525------ */ void main(){ int a,b,c; printf("请输入三个数用逗号隔开: "); scanf("%d,%d,%d",&a,&b,&c); printf("the number one is :%d ",a); printf("the number two is :%d ",b); printf("the number three is :%d ",c); if(a>b) { if(b>c) { printf("%d,%d,%d ",a,b,c); } else { if(a>c) { printf("%d,%d,%d ",a,c,b); } else { printf("%d,%d,%d ",c,a,b); } } } else { if(b>c) { if(a>c) { printf("%d,%d,%d ",b,a,c); } else { printf("%d,%d,%d ",b,c,a); } } else { printf("%d,%d,%d ",c,b,a); } } }