填空:用指针交换数字,从大到小输出

来源:百度知道 编辑:UC知道 时间:2024/06/04 07:41:14
#include "stdio.h"
void swap(____________________)
{ int temp;
temp=*p1;
*p1=*p2;
*p2=temp;
}
int main()
{int a,b; int *pa,*pb;
scanf("%d%d",%a,%b);
pa=&a;pb=&b;
if(a<b) swap(______________);
printf("%d %d\n",a,b);
}

谢谢,帮忙填一下,不知道其他打错了没

scanf("%d%d",%a,%b); ?????
scanf("%d%d",&a,&b);
#include "stdio.h"
void swap(___int *p1,int *p2_________________)
{ int temp;
temp=*p1;
*p1=*p2;
*p2=temp;
}
int main()
{int a,b; int *pa,*pb;
scanf("%d%d",&a,&b);
pa=&a;pb=&b;
if(a<b) swap(___pa,pb___________);
printf("%d %d\n",a,b);
}