How to display a number of type Float64 upto one decimal place only
I have a variable , Float64 min; I want to display it only upto 1 place of decimal. Right now, I get 6 places if I use 开发者_C百科%f. How do I get only upto 1 place?
Use:
printf("%.1f", min);
See any reference such as this for details.
精彩评论