+ 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
2 Respostas
+ 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";
+ 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 :)