Question: Example run: Enter your numerator: 4.6 Invalid input, enter whole numbers only! Enter your numerator: -9 Enter your denominator: 45 The lowest terms of your

Example run: Enter your numerator: 4.6 Invalid input, enter whole numbers only! Enter your numerator: -9 Enter your denominator: 45 The lowest terms of your fraction: -1/5 Do you want to do another conversion? (0-no, 1-yes): 1 Enter your numerator: 8 Enter your denominator: abc8 Invalid input, enter whole numbers only! Enter your denominator: 0 Invalid input, denominator cannot be 0! Enter your denominator: 2 The lowest terms of your fraction: 4 Do you want to do another conversion? (0-no, 1-yes): 0 Required function(s): Your program must involve the following functions. You may not change the parameters or the return type!!! 1 //return false if denominator is 0, return true otherwise //Reduce both numerator and denominator to lowest terms inside the function bool to_lowest_terms(int &numerator, int &denominator); OR bool to_lowest_terms(int *numerator, int *denominator); //return the greatest common divisor of num1 and num2 int g_c_d(int num1, int num2); - this must be a recursive function, and you will need to explain the algorithm during demo Note: If you use an algorithm that requires a third parameter, that is also fine.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!