Return remainder of floating point division: fmod : Mod « Math « C / ANSI-C






Return remainder of floating point division: fmod

 Return remainder of floating point division: fmod

#include <stdio.h>
#include <math.h>

int main ()
{
  printf ("fmod of 6.3 / 2 is %lf\n", fmod (6.3,2) );
  printf ("fmod of 19.5 / 4.2 is %lf\n", fmod (19.5,4.2) );
  return 0;
}




           
       








Related examples in the same category

1.floating-point remainder value function
2.Mod and divide
3.Split floating-point value into fractional and integer parts: how to use modf
4.Use the mod % operator