#include<iostream>
using namespace std;
int main()
{
void exchange(int *q1,int *q2,int *q3); //声明函数
int a,b,c,*p1,*p2,*p3; //定义指针变量
cin>>a>>b>>c;
p1=&a;
p2=&b; //取ABC地址给p1,p2,p3.
p3=&c;
exchange(p1,p2,p3);
cout<<a<<" "<<b<<" "<<c<<endl;
}
void exchange(int *q1,int *q2,int *q3) //int * 型
{
void swap(int *r1,int *r2);
if(*q1<*q2) swap(q1,q2);
if(*q2<*q3) swap(q2,q3);
if(*q1<*q3) swap(q1,q3);
}
void swap(int *r1,int *r2)
{
int temp;
temp=*r1; //变量值互换
*r1=*r2;
*r2=temp;
}