The division operator

**/**is computes the quotient (either between float or integer variables).

The modulus operator

**%**computes the remainder when one integer is divided by another (modulus operator cannot be used for floating-type variables).

For the better understanding of this program you have to know more about the following C++ programming topic(s) :

C++ function

#### The formula is to calculate quotient and remainder is:

quotient = dividend / divisor

remainder = dividend % divisor

### Example#3.0: C++ program to calculate the quotient and remainder of two numbers without function:

#### Output

Enter dividend : 36

Enter divisor : 7

Quotient : 5

Remainder : 1

Press Enter to return to Quincy...

### Example#3.1: C++ program to calculate the quotient and remainder of two numbers using function:

#### Output

Enter dividend : 36

Enter divisor : 7

Quotient : 5

Remainder : 1

Press Enter to return to Quincy...

## Post a Comment