Answer to Question #68463 in C++ for queeny wallace
• 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
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.
Need a fast expert's response?Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!