Quotient & Remainder

Description:

Write a program to read 2 numbers & print Quotient & Remainder. Test Case 1 Input (stdin) 4 2 Expected Output 2 0 Test Case 2 Input (stdin) 50 100 Expected Output 0 50

Program :

#include <iostream>

 using namespace std;

int main()

 {

int divisor, dividend, quotient, remainder;

cin >> dividend;

cin >> divisor;

 quotient = dividend / divisor;

 remainder = dividend % divisor;

cout << "" << quotient;

cout << " " << remainder;

return 0;

 }