Question: USING C++, CODE THE PROGRAM BELOW SO THAT IT HANDLES EXCEPTIONS SUCH AS DIVISIONS BY ZERO AND INVALID INPUTS. (Fraction calculator) Write a program that

USING C++, CODE THE PROGRAM BELOW SO THAT IT HANDLES EXCEPTIONS SUCH AS DIVISIONS BY ZERO AND INVALID INPUTS.
USING C++, CODE THE PROGRAM BELOW SO THAT IT HANDLES EXCEPTIONS SUCH

(Fraction calculator) Write a program that lets the user perform arithmetic operations on tractions Fractions are of the form a/b, in which a and bare integers and *0. Your program must be menu driven, allowing the user to select the operation (+, - or/and input the numerator and denominator of each fraction. Furthermore, your program must consist of at least the following functions: * Function menu: This function informs the user about the program's purpose, explains how to enter data, and allows the user to select the operation Function addFractions: This function takes as input four integers representing the numerators and denominators of two fractions, adds the fractions, and returns the numerator and denominator of the result. (Notice that this function has a total of six parameters.) c Function subtractFractions: This function takes as input four integers representing the numerators and denominators of two fractions, subtracts the fractions, and returns the numerator and denominator of the result. (Notice that this function has a total of six parameters.) & Function multiplyFractions: This function takes as input four integers representing the numerators and denominators of two fractions, multiplies the fractions, and returns the numerators and denominators of the result. (Notice that this function has a total of six parameters.) Function divide Fractions: This function takes as input four integers representing the numerators and denominators of two fractions, divides the fractions, and returns the numerator and denominator of the result. (Notice that this function has a total of six parameters.) Some sample outputs are: 3/4 + 2/5 - 23 / 20 2/3 3/5 - 6 / 15 Your answer need not be in the lowest terms

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!