+ 1
C++
What did I do wrong, somebody help me, please. #include <iostream> using namespace std; int main() { //измените данный код cout << "C" <<\n; cout << "+" <<\n; cout << "+"; return 0; }
3 odpowiedzi
+ 3
\n is a character so it comes within double quote (" ")
write "\n" ;
you can use endl (end line ) also (without quotes)
+ 4
Thirt13n Diana Bielinska
Don't always have to be within double quotes like mentioned tho.
Even with single quote works... because \n is an escape sequence/character for newline.
cout << "sololearn" << '\n';