Answers for "how to find the remainder of a division c++"

C++
1

how to find quotient and remainder in c++

#include <iostream>

using namespace std;

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

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

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

    quotient = dividend / divisor;
    remainder = dividend % divisor;
    
    cout<< "Value of quiotent: "<< quotient<< endl;
    

    cout<< "Value of remainder: "<<remainder<<endl;
    

    return 0;
}
Posted by: Guest on March-05-2021

Code answers related to "how to find the remainder of a division c++"

Browse Popular Code Answers by Language