real ceil(real x); real floor(real x); real frac(real x); real round(real x); real trunc(real x);
Returns
ceil returns the smallest integer not less than x. floor returns the largest integer not greater than x. frac returns the fractional part of x. round returns x rounded to the nearest integer. trunc returns the integer part of x.
Example
real x = 2.567;
printf("The rounded value of %f is %f\n", x, round(x));