+ 2

How do I seperate sentences code in cpp?

https://code.sololearn.com/chCIkdvrjhu9/?ref=app How do I seperate sentences code in cpp? In my code here I put the setences on separate lines and used a semi-colon but the two sentences still merge the words Max and My

16th Jun 2017, 1:15 AM
Hero
Hero - avatar
2 Answers
+ 6
endl; e.g cout << "A new line comes after this" << endl; or for a space simply include one at the end of the first string cout << "A space between this "; cout << "and this";
16th Jun 2017, 1:19 AM
jay
jay - avatar
+ 4
Just for preference, I tend to use the special character '\n' when I'm already using quotes. For example: cout << "I'm already using quotes, so I use the newline character.\n"; cout << "I am using a variable, " << variable << endl; Either way is perfectly fine :)
16th Jun 2017, 4:47 AM
Zeke Williams
Zeke Williams - avatar