C++

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

Download Link


Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button
Close
Close