Some times we use (cout<<"/n" <<"/n" ; ) why do we use /n double time ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Some times we use (cout<<"/n" <<"/n" ; ) why do we use /n double time ?

15th Feb 2018, 11:00 AM
S Prajwal
S Prajwal - avatar
3 Answers
+ 11
\n equals a new line. two \n equals two new lines. It is easier to write cout << "\n\n"; than cout << " \n" << "\n" ; it is the same.
15th Feb 2018, 11:05 AM
jay
jay - avatar
+ 4
You could have stuff bw the lines breaks: cout<<"something\nsomething else\nanotherthing";
15th Feb 2018, 11:20 AM
J.G.
J.G. - avatar
+ 1
We use \n two times to leave a blank line.
16th Feb 2018, 1:35 AM
Anil