C++ Example - Output Newline
Use C++ to output and break lines between multiple outputs, using \n or endl:
Example - \n newline
include
<
iostream
using
namespace
std;
int
main
(
)
{
cout
<<
"
Runoob
\n
"
;
cout
<<
"
\n
"
;
cout
<<
"
Taobao
"
;
return
0
;
}
Example - endl newline
include
<
iostream
using
namespace
std;
int
main
(
)
{
cout
<<
"
Runoob
"
<<
endl
;
cout
<<
"
"
<<
endl
;
cout
<<
"
Taobao
"
;
return
0
;
}
The output of the above program is:
Runoob
Google
Taobao
C++ Example