Run ID:27605
提交时间:2022-06-07 11:15:54
#include<iostream> #include<cstdio> #include<cstring> using namespace std; int main() { int *p1,*p2,*p3,*t = new int; int a,b,c; p1 = &a; p2 = &b; p3 = &c; cin>>a>>b>>c; if(*p1<*p2) { *t = *p1; *p1 = *p2; *p2 = *t; } if(*p1<*p3) { *t = *p1; *p1 = *p3; *p3 = *t; } if(*p2<*p3) { *t = *p2; *p2 = *p3; *p3 = *t; } cout<<*p1<<" "<<*p2<<" "<<*p3; return 0; }