Tip - C - 'printf' with leading zeros

Published  | Submitted by Maria Echeverria
C - 'printf' with leading zeros

I have a floating point number such as 4917.24. I'd like to print it to always have five characters before the decimal point, with leading zeros, then three digits after the decimal place. I tried

About Author

More by Maria Echeverria

About This Tip

Posted: 9 years, 5 month(s) ago

161 Reads
0 Votes