1. Home
  2. /
  3. Blog
  4. /
  5. C++ Program to Find Quotient and Remainder
C++

C++ Program to Find Quotient and Remainder

October 1, 2022 1 min read 2,205
C++ Program to Find Quotient and Remainder

#include <iostream>
using namespace std;

int main()
{    
    int divisor, dividend, quotient, remainder;

    cout << "Enter dividend: ";
    cin >> dividend;

    cout << "Enter divisor: ";
    cin >> divisor;

    quotient = dividend / divisor;
    remainder = dividend % divisor;

    cout << "Quotient = " << quotient << endl;
    cout << "Remainder = " << remainder;

    return 0;
}
Share:
Read next

Related articles