Why ceil of 2.0 gives 3 in C++ inside loop?

前端 未结 0 1394
慢半拍i
慢半拍i 2021-02-13 13:00

I\'m using a loop in C++17 to check the output of ceil function (in cmath header file) for different values from 0.9 to 3.1 at an interval of 0.1
For ceil(2.0)

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