Using printf function

后端 未结 5 844
时光说笑
时光说笑 2021-01-22 13:01

I\'ve never bothered to look for printf as I started learning C++ without C. Now i want to use formatted output in some project. so I\'m looking for some references that can exp

5条回答
  •  爱一瞬间的悲伤
    2021-01-22 13:30

    Yes you already have the answer, %d will print integer values only. Use "%f" which stands for float values . If you use %f you will get 1.500000

提交回复
热议问题