- 1

What does %5.2f do in c program?

3rd Oct 2016, 5:50 PM
Raj shah
Raj shah - avatar
2 ответов
+ 3
just a precision on what Mythos has said. %v.df formats a float number to 'n' total digits and 'd' decimals... 'f' means float, if there was %d at the place, this would mean you're printing an int value. P.S.: my English is awful...
9th Oct 2016, 10:47 PM
Tanguy WAMINA
Tanguy WAMINA - avatar
+ 1
Formats a number to 5 total digits and two decimals
3rd Oct 2016, 11:04 PM
Mythos