Mega Code Archive

 
Categories / C / Math
 

Return remainder of floating point division

#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; }