[C] float with 2 decimal places ... Save Report jc - Last answer on 23 févr. 2016 1 answer Hi! I need a little help with C. As my title suggests, I would like to know how to convert a number like 5.220000000 to 5.22 Do you have any ideas? ThanksConfiguration: Windows Vista Safari 525.19 Show more Related links: Display a float or double Javascript Round to 2 Decimal Places 3 decimal places ?? Count the number of decimals (Excel version) Excel: Round or truncate to 3 decimal places Word – Mail Merge with rounding to 2 decimal places 1 answer Sorted by votes Votes Date Descending date Answer 1 / 1 - Best answer The best answer is the one that has been validated by our teams. ... Report loupius If it's for display; printf("%.2f", number); ... Report jc thank you!!!!!!!!!!!!!!!! ... Report omam4701 Thank you very much.
Answer 1 / 1 - Best answer The best answer is the one that has been validated by our teams. ... Report loupius If it's for display; printf("%.2f", number); ... Report jc thank you!!!!!!!!!!!!!!!! ... Report omam4701 Thank you very much.