Answers for "what does ceil function do in c++"

C++
1

ceil value in c++ using formula

(a + b - 1) / b;
// this formula works for integer as well. ceil function in c++ takes double type value. To get ceil value for integer division you can simply use this expression without converting your datatype to double type.
Posted by: Guest on February-20-2021

Browse Popular Code Answers by Language