C++:endl的作用

在c++里endl的作用相当于换行。

#include<iostream>
using namespace std;
int main(){
	cout<<"Hello world";
	cout<<"Hello world"<<endl;
	cout<<"Hello world";
	return 0;
}

【运行结果】
在这里插入图片描述

发布了31 篇原创文章 · 获赞 2 · 访问量 3840

猜你喜欢

转载自blog.csdn.net/weixin_44652687/article/details/101025238
今日推荐