how to find quotient and remainder in c 2b 2b

Solutions on MaxInterview for how to find quotient and remainder in c 2b 2b by the best coders in the world

showing results for - "how to find quotient and remainder in c 2b 2b"
Joleen
08 Sep 2017
1#include <iostream>
2
3using namespace std;
4
5int main()
6{
7    int divisor, dividend, quotient, remainder;
8
9    cout<< "Enter dividend: ";
10    cin>> dividend;
11
12    cout<< "divisor: ";
13    cin>> divisor;
14
15    quotient = dividend / divisor;
16    remainder = dividend % divisor;
17    
18    cout<< "Value of quiotent: "<< quotient<< endl;
19    
20
21    cout<< "Value of remainder: "<<remainder<<endl;
22    
23
24    return 0;
25}