C++ output

https://www.codecademy.com/courses/learn-c-plus-plus/lessons/cpp-hello-world/exercises/console-output?action=resume_content_item

inputting the code-
std::cout << “Codecademy/n”;
yields
Codecademy/n

where to input ‘/n’ to obtain ‘Codecademy’ as a result?

You used the wrong slash. For ‘escaping’ a character, you use the backslash key \ instead of the forward slash.

std::cout << "Codecademy\n";

//Output:
Codecademy

Hope this helps!

1 Like