Define a rational number class. A rational number is a number composed of two integers with division indicated, as in 1/2, 2/3, and 4/5. A rational number is defined using two integer variables: numerator and denominator. Include functions to perform the following operations:
a/b + c/d = (a.d + b.c) / (b.d) (addition)a/b - c/d = (a.d - b.c) / (b.d) (subtraction)(a/b) . (c/d) = (a.c)/(b.d) (multiplication)(a/b) / (c/d) = (a.d) / (c.b) (division)
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.