网站首页
编程语言
数据库
系统相关
其他分享
编程问答
sortIntegers
2024-07-18
C语言 指针方法 输入3个整数,按由小到大的顺序输出
输入3个整数,按由小到大的顺序输出#include<stdio.h>voidsortIntegers(int*a,int*b,int*c){if(*a>*b){inttemp=*a;*a=*b;*b=temp;}if(*a>*c){inttemp=*a;*a=*c;*c=temp