+ 3

How do I add spaces?

24th Jan 2018, 1:53 PM
Prakriti Chaudhuri
11 Respostas
+ 12
if you think on spaces in text just put it in your string and new line you can get by using "\n" in your string or << endl <<
24th Jan 2018, 2:07 PM
Vukan
Vukan - avatar
+ 1
You can also use “\t” for tab.
24th Jan 2018, 2:21 PM
Jacob Pembleton
Jacob Pembleton - avatar
+ 1
also methods like setw() can be used to add proper spaces in order to get good and clear arrangement of cout stuff
24th Jan 2018, 2:24 PM
Agrawal Jay
Agrawal Jay - avatar
0
you can use \n for it
29th Jan 2018, 12:50 AM
srihari pappu
srihari pappu - avatar
0
\t for blank space
29th Jan 2018, 12:50 AM
srihari pappu
srihari pappu - avatar
- 1
if u want space in question and answer u may use " /t" or just give space when u end cout statement using double quote.
24th Jan 2018, 3:40 PM
abhijeet kulkarni
abhijeet kulkarni - avatar
- 1
If you mean regular whitespace, try: cout << " ";
24th Jan 2018, 3:41 PM
LunarCoffee
LunarCoffee - avatar
- 1
yup
24th Jan 2018, 4:24 PM
abhijeet kulkarni
abhijeet kulkarni - avatar
- 1
cout<<" " ; depend on how much space you need just add space between double quotes.
24th Jan 2018, 9:15 PM
Yashabh Goyal
Yashabh Goyal - avatar
- 1
endl
25th Jan 2018, 12:28 AM
Forson Emmanuel
Forson Emmanuel - avatar
- 1
You can as well use double" \n\n" for a blank space in between two or more lines.
26th Jan 2018, 5:43 PM
Destiny Wisdom Idia
Destiny Wisdom Idia - avatar