C++ solution checking

Hi everyone!
I need a help to have 2 and more solution for 3 problem. It would be wonderful if someone will help me. The problems are as foolows:

Problem 1: Write a C++ function int div(double &nominator, double denominator) that computes the integer part of double division. It takes as its arguments double &nominator by reference and double denominator by value and returns the integer part of the division. Before returning the result, it assigns the remainder to the nominator. For example, if nominator is 3.7 and denominator is 1.4, the function returns 2 with nominator assigned a new value 0.9, since 3.7 - 2 * 1.4 = 0.9.
Topic archived. No new replies allowed.