just input the spaces before the numbers and align them the way you want.
Yes, let's write specific code that can only be used in certain cases
2. I already said that. Also, you can use a temporary string or number for the variable.
3. It does not left align it. It right-aligns it. You have to put "%-5d" for a left-align.
I should have mentioned that this works for all the formats that printf() (actually, vsprintf()) accepts.