C++ Program to Find Quotient and Remainder

To understand this example, you should have knowledge of following C++ programming topics:
Examples C++ Objects and Class, Find Quotient and Remainder.
In this program, user is asked to enter two integers(divisor and dividend) and this program computes the quotient and remainder. To compute quotient and remainder, both divisor and dividend should be integers.

Output
Enter dividend: 13
Enter divisor: 4
Quotient = 3
Remainder = 1
 
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).

Tag : Examples C++ Objects and Class, Find Quotient and Remainder.

Silahkan komentar pada kolom dibawah ini jika ada yang ingin ditanyakan tentang C++ Program to Find Quotient and Remainder.

0 Response to "C++ Program to Find Quotient and Remainder"