n decimal places in c++ with printf()

后端 未结 0 1178
悲&欢浪女
悲&欢浪女 2020-12-10 04:26

I want to print a float with n decimal places in c++ language with printf() for example: n=3 and the float number is: 3.985635 so i want output to be: 3.985 (with 3 decima

相关标签:
回答
  • 消灭零回复
提交回复
热议问题