C++
Exercise#2: Fraction Calculator Open the file Problem 2.cpp Write a Ctt program that simulates a calculator for performing arithmetic operations on fractions ractions are of the form a/b where a and b are integers and b z o. The program asks the user to enter four values n1, d1, n2, d2 that represent the numerator and the denominator of the two fractions followed then the two fractions are minato by one of the four operations (t,, , or /). For example if the array has 3 4 5 6 3/4 and 5/6. If a denominator is 0 then the program terminates and prints the message "Deno prints the message "Invalid operator. Program terminates" The program has the following functions can't be zero. Program terminates". If the operation is not one of the characters +,, or/the prograr float addFractions(int, int, int, int): The function adds the two fractions and returns the result as a flo number. For example the program returns 1.58333 if the function arguments are 3 4 56. float subFractions(int, int, int, int): The function subtracts the two fractions and returns the result a float number. For example the program returns-0.08333 if the function arguments are 3 4 5 6 void mulFractions(int, int, int, int, int &, int &): The function multiples the two fractions. The mais function prints the result of the multiplication of the two fractions as a fraction number. For example main() prints 15/24 if the function arguments are 3 456 void divFractions(int, int, int, int, int &, int &): The function divides the two fractions. The main() funct prints the result of the multiplication of the two fractions as a fraction number. For example the moai prints 18/20 if the function arguments are 3 456 Sample input/output: nter the numerator and the denominator of the first number:34 nter the numerator and the denominator of the second number: 5 6 er one of the four operator +,or /: + he results of adding the two fractions are: 1.58333