Question: Write program .(Fraction calculator) Write a program that lets the user perform arithme- tic operations on fractions. Fractions are of the form a/b, in which
.(Fraction calculator) Write a program that lets the user perform arithme- tic operations on fractions. Fractions are of the form a/b, in which a and b are integers and b 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: a. Function menu: This function informs the user about the program's pur- pose, explains how to enter data, and allows the user to select the operation. Function addPractions: This function takes as input four integers rep- resenting 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.) b. c Function subtractFractions: This function takes as input four inte- gers 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 inte- gers 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.) d
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
