I tried to change the basic code hello world to-"hello world! "" how are you";but the out put didn't showed any gap between both sentences.. Why? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I tried to change the basic code hello world to-"hello world! "" how are you";but the out put didn't showed any gap between both sentences.. Why?

14th Jul 2016, 1:35 PM
Sonali Pandey
Sonali Pandey - avatar
6 Answers
+ 1
just type "\n" after the exclaimation mark of hello world (without quotes)
14th Jul 2016, 1:37 PM
Aditya Kolte AKo
Aditya Kolte AKo - avatar
0
\n means new line you can also type "cout<<endl" to get to next line
14th Jul 2016, 1:39 PM
Aditya Kolte AKo
Aditya Kolte AKo - avatar
0
Ok
14th Jul 2016, 1:41 PM
Sonali Pandey
Sonali Pandey - avatar
0
It is still showing error
14th Jul 2016, 1:46 PM
Sonali Pandey
Sonali Pandey - avatar
0
just try pasting this crap cout<<"hello world!!\n"<<"how are you";
14th Jul 2016, 1:52 PM
Aditya Kolte AKo
Aditya Kolte AKo - avatar
0
cout<<"hello world! how are you"; for the gap cout<<"hello world! \n how are you"; to get both sentences in different lines
14th Jul 2016, 2:08 PM
deepak h.s
deepak h.s - avatar