remquo : remquo « math.h « C Tutorial






ItemValue
Header filemath.h
Declarationfloat remquof(float a, float b, int *quo);
double remquo(double a, double b, int *quo);
long double remquol(long double a, long double b, int *quo);
Returnreturns the remainder of a/b.


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

  int main(void)
  {
    double x = 10.0, y = 0.0;
    int i;

    do {
      printf("%f\n", remquo (x, y+1,&i));
      printf("%d",i);
      y++;
    } while(y<11.0);

    return 0;
  }
0.000000
20.000000
01.000000
12.000000
20.000000
2-2.000000
23.000000
02.000000
01.000000
00.000000
0-1.000000
0








19.58.remquo
19.58.1.remquo