how to find remainder function in c++ code example
Example: 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;
}