Why we use endl at the end of cout?? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Why we use endl at the end of cout??

14th Sep 2019, 12:27 PM
THE CRAZY ONE āœŒļø
THE CRAZY ONE āœŒļø - avatar
3 Respostas
+ 3
To break lines. If you do: cout << "This is a line"; cout << "This is another line"; you will get the beautiful output of: "This is a lineThis is another line"; If you use endl, it will do a line break.
14th Sep 2019, 12:29 PM
Airree
Airree - avatar
+ 1
Thx swim
14th Sep 2019, 12:33 PM
THE CRAZY ONE āœŒļø
THE CRAZY ONE āœŒļø - avatar
0
Thx airee
14th Sep 2019, 12:30 PM
THE CRAZY ONE āœŒļø
THE CRAZY ONE āœŒļø - avatar