cout | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

cout

Just noticed that you don't need the second cout to start the next statement. cout << "Hello"; << endl; << "World"; should work.

4th Nov 2016, 11:31 PM
Ryan Busby
Ryan Busby - avatar
7 Answers
+ 6
You can write cout << "Hello" << endl << "World"; One more thing cout << "Hello << "\n" << "World";
5th Nov 2016, 12:30 AM
Hay Dane
Hay Dane - avatar
0
yes, but without semicolons near "Hello" and endl
4th Nov 2016, 11:46 PM
Leo Flame
Leo Flame - avatar
0
Ah well yes, haha.
4th Nov 2016, 11:49 PM
Ryan Busby
Ryan Busby - avatar
0
The right is cout << "Hello" << "World";
5th Nov 2016, 12:25 AM
Hay Dane
Hay Dane - avatar
0
Hay, I was talking about using endl for a new line and continuing on without introducing a second cout.
5th Nov 2016, 12:27 AM
Ryan Busby
Ryan Busby - avatar
0
Yeah. I noticed \n as I went further on, thanks.
5th Nov 2016, 12:42 AM
Ryan Busby
Ryan Busby - avatar
0
Woww
21st Sep 2019, 4:29 AM
Carmen Ooi
Carmen Ooi - avatar