Modulus function

How do I write a function that takes 4 integer parameters?

the first two of which are user-supplied inputs (call-by-value parameters) and the last two of which are the quotient and remainder that results when the first parameter is divided by the second parameter (call-by-reference parameters).

The input would be

cout << "Please enter two integers:" << endl;
cin >> "Quotient is" >> quotientvariable >> "Remainder is" >> remaindervariable >> endl;

This is also a void function
void Modulus_function(int num1, int num2, int &quotient, int &remainder);
Topic archived. No new replies allowed.