+ 5
How to use "\t" in SoloLearn's Playground?
I have a Calender Program which requires the use of \t to Correctly space the Dates as a Calender. But it does not leave any space!! I have 1 digit and 2 digit nos which require different spaces - 1 dgt require 5 spcs and 2 dgt require 4 spcs. Though this is done automatically by \t, I don't want to use more if else's... The setw() manipulator is also not giving me the Perfect Output.... Please Help Meee!!!
2 Respostas
+ 27
Theres a "TAB" button on left bottom corner in the code playground. You can use that... if it helps :/
+ 4
@ Frost
Srry, but the TAB in the Playground works only as shown during input and leaves a finite space, whereas the \t automatically spaces the next character in respect to the previous one.
And yes, when I tried, the output was same as printing 4 spaces, and the numbers got entangled... :(