//用指针函数 对输入的两个整数按大小顺序输出
#include<iostream.h>
#include<conio.h>
int main()
{
void swap(int*p1,int *p2);
int *p1,*p2,*p,a,b;
cin>>a>>b;
p1=&a;
p2=&b;
if(a<b)
swap(p1,p2);
cout<<"max="<<a<<" "<<"min="<<b<<endl; //输出的是a,b的值
getch();
return 0;
}
void swap(int*p1,int *p2) //交换的是a,b 的值!!!
{
int t;
t=*p1;
*p1=*p2;
*p2=t;
}