ceil()
Prototype: double ceil(double x);
Header File: math.h (C) or cmath (C++)
Explanation: Use this to round a number up. It returns the smallest integer
greater than or equal to x.
ANSI: C and C++
Example:
//Program uses ceil to round a decimal number up.
//Program also shows using ciel to round division up.
#include <cmath>
#include <iostream>
int main()
{
cout<<ceil(2.0/4.0);
double x=.4;
cout<<ceil(x);
}
Other Functions