Math h C Tutorial

Item Value
Header filemath.h
Declarationfloat nearbyintf(float arg);double nearbyint(double arg);long double nearbyintl(long double arg);
Returnreturns the value of arg rounded to the nearest integer.

#include 
  #include 
  int main(void)
  {
     double f;
     f = nearbyint (2.3);
    
     printf("%f " , f);
  }
2.000000