c++ 实例 - 输出换行
使用 c++ 输出,并对多个输出内容进行换行,使用 n 或 endl:
实例 - n 换行
#include <iostream>using namespace std;
int main() { cout << "runoob n";
cout << "google n";
cout << "taobao";
return 0;}
实例 - endl 换行
#include <iostream>using namespace std;
int main() { cout << "runoob" << endl;
cout << "google" << endl;
cout << "taobao";
return 0;}
以上程序执行输出结果为:
runoob google taobao
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!