How do I pad a printf to take account of negative signs and variable length numbers?

后端 未结 2 1222
予麋鹿
予麋鹿 2021-02-02 08:09

I\'m trying to output some numbers in a log file and I want to pad a load of floats via the printf function to produce:

 058.0
 020.0
 038.0
-050.0
         


        
2条回答
提交回复
热议问题