#include<stdio.h> int main() { void exchange(int x,int y); int a,b,c; printf("please input three numbers:\n"); scanf("%d,%d,%d",&a,&b,&c); if(a<b) exchange(a,b); if(a<c) exchange(a,c); if(b<c) exchange(b,c); printf("the order is %d,%d,%d\n",a,b,c);return 0; } void exchange(int x,int y) {int m; m=x; x=y; y=m;}
1 回答
- 1 回答
- 0 关注
- 1327 浏览
添加回答
举报
0/150
提交
取消