使用 C++ 输出,并对多个输出内容进行换行,使用 \n 或 endl:
#include <iostream>
using namespace std;
int main() {
cout << "Runoob \n";
cout << "Google \n";
cout << "Taobao";
return 0;
}#include <iostream>
using namespace std;
int main() {
cout << "Runoob" << endl;
cout << "Google" << endl;
cout << "Taobao";
return 0;
}以上程序执行输出结果为:
Runoob Google Taobao