Javatpoint Logo
Javatpoint Logo

C++ Math remquo()

The function finds the floating point remainder of numerator/denominator (rounded to the nearest integer value) and it also stores the quotient internally to the pointer passed in the parameter of the function.

Syntax

Suppose a numerator be 'n', denominator be 'd' and pointer 'p'. Syntax would be:

Note: The return_type can be float, double or long double.

Parameter

n: The value of numerator.

d: The value of denominator.

p: The pointer to an object where the quotient is stored internally.

Return value

It returns the floating point remainder n/d.

Example 1

Let's see a simple example when the arguments are of same type.

Output:

Value of remainder is :2.2
Value of quotient is :1

Example 2

Let's see a simple example when the arguments are of different type.

Output:

Value of remainder is :0.2
Value of quotient is :2

Next TopicC++ Math Functions




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


B.Tech / MCA