编写一个子过程,输入两个数,从小到大排序后输出

来源:学生作业帮助网 编辑:六六作业网 时间:2024/05/29 04:08:10
编写一个子过程,输入两个数,从小到大排序后输出编写一个子过程,输入两个数,从小到大排序后输出编写一个子过程,输入两个数,从小到大排序后输出inta,b;printf("pleaseentertwonu

编写一个子过程,输入两个数,从小到大排序后输出
编写一个子过程,输入两个数,从小到大排序后输出

编写一个子过程,输入两个数,从小到大排序后输出
int a,b;
printf("please enter two num\n");
scanf("a=%d,b=%d\n",&a,&b);
if(a>b)
printf("the num after arraged are :%5d%5d\n",&a,&b);
else
printf("the num after arraged are :%5d%5d\n",&b,&a);