puts()函数会在字符串末尾自动的添加换行符
所以puts(""); 等价于 cout << endl;
#include<bits/stdc++.h>
using namespace std;
int main(){
cout << "hello";
puts("");
cout << "world";
cout << endl << "------" << endl;
cout << "hello";
cout << endl;
cout << "world";
}
puts()函数会在字符串末尾自动的添加换行符
所以puts(""); 等价于 cout << endl;
#include<bits/stdc++.h>
using namespace std;
int main(){
cout << "hello";
puts("");
cout << "world";
cout << endl << "------" << endl;
cout << "hello";
cout << endl;
cout << "world";
}