I know that to print the number 2.0000 to 2 decimal places I print% .2 f. But my question is:
input:
2
1000
20
200
output
0002
1000
0020
0200
how to increase the decimal places from right to left?
Have you tried %04d?
Last edited on
very interesting your MSDN link in *NIX forum ...
printf is from the standard library. What does it matter who describes it?
Because Microsoft has non-standard extensions to printf() family of functions, which is only available with Visual Studio compiler.
Last edited on
I guess support for __int32 and __int64 are a hint.
Point taken.