Question #68462

how do i Create separate functions (outside of the class) to perform the following operations:
• void printRatio(Ratio r): Print a Ratio in the form a/b.
• Ratio getRatio(): Get input from the user for a numerator and denominator and
return a Ratio with the values indicated by the user.
• Provide public functions that perform arithmetic on your new data type: Add, Subtract,
Multiply, Divide two Ratios. The result of arithmetic operations should be a Ratio in
reduced form.
Review the rules of fractional arithmetic to make sure your functions work as one would
expect them to. Remember that for addition and subtraction you need to find a common
denominator, while that is not necessary for multiplication and division.

Expert's answer

Dear queeny wallace, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: **Submit order**

## Comments

## Leave a comment