remquo - C math.h

C examples for math.h:remquo

Type

function

From

<cmath>
<ctgmath>
<math.h>

Description

Returns the same as remainder, and stores the quotient internally used to determine its result in the object pointed by quot.

Prototype

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);  


       

Parameters

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.

Return Value

The remainder of dividing the arguments.

Demo Code


#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,&quot);
  
  printf ("numerator: %f\n", numer);
  
  printf ("denominator: %f\n", denom);
  
  printf ("remainder: %f\n", result);
  
  printf ("quotient: %d\n", quot);
  return 0;
}

Related Tutorials