0% found this document useful (0 votes)
26 views5 pages

C 50

Uploaded by

hlemorvan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
26 views5 pages

C 50

Uploaded by

hlemorvan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 5
‘111212028 20.58 (C++ New Lines 3 w Tutorialsy —Exercisesw Servicese§ QO Log in schools C++ New Lines [crv] Looe | New Lines To insert a new line, you can use the \n character: Example #include using namespace std; int main() { cout << "Hello World! \n"; cout << "I am learning C++"; return 03 Tip: Two \n characters after each other will create a blank line: Example #include using namespace std; nitpsdlmww:wdschools.comleppicpa_new_lines.asp us ‘111212028 20.58 (C++ New Lines 3 w Tutorialsy —Exercisesw Servicese§ QO Log in schools Another way to insert a new line, is with the endl manipulator: Example #include using namespace std; int main() { cout << "Hello World!" << endl; cout << "I am learning C++"; return 0; Both \n and endl are used to break lines, However, \n is most used, But what is \n exactly? The newline character ( \n ) is called an escape sequence, and it forces the cursor to change its position to the beginning of the next line on the screen. This results in a new line. Examples of other valid escape sequences are Escape Sequence _ Description Try it \t Creates a horizontal tab \ Inserts a backslash character (\) nitpsdlmww:wdschools.comleppicpa_new_lines.asp 26 ‘111212028 20.58 (C++ New Lines VY" Tutorials» —Exercises~ Services Q @ SignUp Login CSS JAVASCRIPT SQL. PYTHON. «JAVA. PHP, «Ss « HOWTO —W3,CSS_—C Log in to track progress J & Earn Your Certificate Today And Unlock Tomorrow's Opportunities! CeCe e Tacs) ‘lethestation hold you back. a The best time to start snow. COLOR PICKER htipsifweww.w3schools.comicoplepe_new_linas asp a6 Tutorials htipsifwnww.w3schools.comicoplepa_new lines. (C++ New Lines Exercises» Services JAVASCRIPT SQL. PYTHON GET CERTIFIED Top Tutorials HTML Tutorial SS Tutorial JavaScript Tutorial How To Tutorial SQL Tutorial Python Tutorial Wa.cSS Tutorial Bootstrap Tutorial PHP Tutorial Java Tutorial C++ Tutorial JQuery Tutorial Top References HTML Reference SS Reference JavaScript Reference SQL Reference Python Reference W3.CSS Reference Bootstrap Reference PHP Reference HTML Colors Java Reference ‘Angular Reference ‘JQuery Reference Top Examples HTML Examples CSS Examples JavaScript Examples How To Examples SQL Examples Python Examples W3.CSS Examples Bootstrap Examples PHP Examples Java Examples XML Examples Query Examples © @ @ © Forum asour ‘W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Q 0 JAVA PHP REPORT ERROR Get Certified HTML Certificate css certificate JavaScript Certificate Front End Certificate SQL Certificate Python Certificate PHP Certificate Query Certificate Java Certificate c++ Certificate Ce Certificate XML Certificate Sign Up How TO Login W3.css Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness a c 46 ‘111212028 20.58 (C++ New Lines 3 w Tutorials» —Exercisese Servicese§ QU O SignUp Login schools = CSS JAVASCR SQL PYTHON JAVA PHP = HOWTO. —-W3,CSS_—C htipsifweww.w3schools.comicoplepe_new_linas asp 56

You might also like