![]() |
#2
lz10919149992012-09-28 12:43
|

#include"iostream.h"
void swap(int *x,int *y);
int main()
{int a,b,c;
cin>>a>>b>>c;
if(a>b)
swap(&a,&b);
if(b>c)
swap(&b,&c);
if(a>c)
swap(&a,&c);
cout<<a<<b<<c;
return 0;
}
void swap(int *x,int *y)
{int temp;
temp=*x,*x=*y,*y=temp;
}
void swap(int *x,int *y);
int main()
{int a,b,c;
cin>>a>>b>>c;
if(a>b)
swap(&a,&b);
if(b>c)
swap(&b,&c);
if(a>c)
swap(&a,&c);
cout<<a<<b<<c;
return 0;
}
void swap(int *x,int *y)
{int temp;
temp=*x,*x=*y,*y=temp;
}