\n
\n为换行符, 可被endl代替
下面代码没有使用任何换行符
输出结果为
123456
#include <bits/stdc++.h>
using namespace std;
int main(){
cout << 123;
cout << 456;
return 0;
}
下面代码用了\n, endl换行符
输出结果为
123
456
#include <bits/stdc++.h>
using namespace std;
int main(){
cout << 123 << "\n";
cout << 456;
return 0;
}
#include <bits/stdc++.h>
using namespace std;
int main(){
cout << 123 << endl;
cout << 456;
return 0;
}
\t
\t为tab, 可输出4个空格
下面代码用了\t
输出结果为
123 456
#include <