#include <stdio.h>
//求帮帮忙,看看我的哪一步骤错了
int main()
{
void exhcange(int *p1,int *p2,int *p3);
int a, b, c;
int *p_1, *p_2, *p_3;
scanf("%d%d%d", &a, &b, &c);
p_1 = &a;
p_2 = &b;
p_3 = &c;
exchange(p_1,p_2,p_3);
printf("%d %d %d ", a, b, c);
return 0;
}
void exchange(int *p1,int *p2,int *p3)
{
void swap(int *t1,int *t2);
if (*p1 < *p2)
{
swap(p1,p2);
}
if (*p1 < *p3)
{
swap(p1,p3);
}
if (*p2 < *p3)
{
swap(p2,p3);
}
}
void swap(int *t1,int *t2)
{
int *t;
t = t1;
t1 = t2;
t2 = t;
}
注意拼写错误