#include <stdio.h>
int main()
{
int *p1,*p2,a=10,b=20,c;
p1=&a;
p2=&b;
if(a<b)
{
c=a;
a=b;
b=c;
}
printf("a=%d,b=%d
",a,b);
printf("最大值=%d,最小值=%d
",*p1,*p2);
return 0;
}
#include <stdio.h>
int main()
{
int *p1,*p2,a=10,b=20,c;
p1=&a;
p2=&b;
if(a<b)
{
c=a;
a=b;
b=c;
}
printf("a=%d,b=%d
",a,b);
printf("最大值=%d,最小值=%d
",*p1,*p2);
return 0;
}