cin
#include <iostream>
using namespace std;
int main(int argc, char const *argv[])
{
cout<<"请输入2个整数:";
int a,b;
cin>>a>>b;
//从小到大排列
if (a<b)
cout << a << " " <<b<<endl;
else
cout << b << " " <<a<<endl;
return 0;
}
iMac-52:array apple$ ./a.out
请输入2个整数:12 23
12 23
iMac-52:array apple$ ./a.out
请输入2个整数:23 12
12 23