#include<stdio.h>
void swap(int *x,int *y)
{
int temp;
temp=*x;
*x=*y;
*y=temp;
}
void exchange(int *q1,int*q2,int *q3)
{
void swap(int *x,int *y);
if(*q1<*q2) swap(q1,q2);
if(*q1<*q3) swap(q1,q3);
if(*q2<*q3) swap(q2,q3);
}
int main()
{
void exchange(q1,q2,q3);
int a,b,c,*p1,*p2,*p3;
scanf("%d %d %d",&a,&b,&c);
p1=&a;
p2=&b;
p3=&c;
exchange(p1,p2,p3);
printf("%d %d %d",a,b,c);
return 0;
}
输入三个数从大到小输出
最新推荐文章于 2024-01-17 23:40:41 发布