C examples for math.h:remquo
function
<cmath> <ctgmath> <math.h>
Returns the same as remainder, and stores the quotient internally used to determine its result in the object pointed by quot.
long double remquol (long double numer, long double denom, int* quot); long double remquo (long double numer, long double denom, int* quot); double remquo (double numer , double denom , int* quot); float remquof (float numer , float denom , int* quot); float remquo (float numer , float denom , int* quot); double remquo (Type1 numer , Type2 denom , int* quot);
Parameter | Description |
---|---|
numer | Floating point value with the quotient numerator. |
denom | Floating point value with the quotient denominator. |
quot | Pointer to an object where the quotient internally used to determine the remainder is stored as a value of type int. |
The remainder of dividing the arguments.
#include <stdio.h> #include <math.h> int main ()/*from w ww . j av a 2s.c o m*/ { double numer = 20.3; double denom = 4.8; int quot; double result = remquo (numer,denom,"); printf ("numerator: %f\n", numer); printf ("denominator: %f\n", denom); printf ("remainder: %f\n", result); printf ("quotient: %d\n", quot); return 0; }