How can I have a variable as the number of decimal points when formatting a float in C

后端 未结 0 411
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-27 11:28

I am new to C so please bare with me.
I want my code to output something like this:

3
3.1
3.14
3.141
3.1415
3.14159

My first thought was to

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