C++: Basic Concepts: Printing a Text: Multiple New Lines

Multiple New Lines
Using a single cout statement with as many instances of \n as your program requires will print out multiple lines of text.


 * #include
 * using namespace std;
 * int main
 * cout << "Hello \n world! \n I \n love \n programming!";
 * return 0;
 * }
 * return 0;
 * }

Try It Yourself

Result: