Math h C Tutorial

Item Value
Header filemath.h
Declarationfloat nexttowardf(float from, long double towards);double nexttoward(double from, long double towards);long double nexttowardl(long double from, long double towards);
Returnreturns the next value after 'from' that is closer to 'towards'.

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