C Tutorial/math.h/nearbyint
nearbyint
Item Value Header file math.h Declaration float nearbyintf(float arg);double nearbyint(double arg);long double nearbyintl(long double arg); Return returns the value of arg rounded to the nearest integer.
#include <math.h>
#include <stdio.h>
int main(void)
{
double f;
f = nearbyint (2.3);
printf("%f " , f);
}