Check out example codes for "ceil in c++". It will help you in understanding the concepts better.

Code Example 1

floor(x):This function in C++ returns the smallest possible integer value which is smaller
 than or equal to the given argument.
Input : 2.5 ,-2.1 ,2.9
Output : 2 ,-3, 2

Code Example 2

ceil(x):The ceil() function in C++ returns the smallest possible integer value which is greater
than or equal to the given argument.
Input : 2.5, -2.1, 2.9
Output : 3 , -2, 3

Learn ReactJs, React Native from akashmittal.com