#include<bits/stdc++.h>
using namespace std;
int main()
{
int a, b, c;
cin>>a>>b;
if(a<b)
{
c=a;
a=b;
b=c;
}
cout<<a<<endl<<b;
return 0;
}头文件是有.h的
if是个函数,形参是个bool,如果有else的话实参是同一个

#include<bits/stdc++.h>
using namespace std;
int main()
{
int a, b, c;
cin>>a>>b;
if(a<b)
{
c=a;
a=b;
b=c;
}
cout<<a<<endl<<b;
return 0;
}头文件是有.h的
if是个函数,形参是个bool,如果有else的话实参是同一个