4.c++ program to compute quotient and remainder


 

// C++ program to compute quotient and remainder

INPUT:

#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<<"\n Quotient = "<<quotient<<endl;

    cout<<"\n Remainder = "<<remainder<<"\n";

    return 0;

}

OUTPUT:




Comments