Question: Can you send me this program in C++ please I send this program too many times and every time the answer is wrong and also
1:47 PM 10% .oooo H20 ehacc hacc.edu Fractions Task: Add several pairs of fractions and sim the resulting sums. plity The program should be able to manage signed numbers, like or unlike denominators, and input values ofzero in either a numerator or a denominator. Azero denominator should be handled by printing an appropriate error message in the output file and without causing a program abend. The final sums should be reduced to lowest terms, and improper fractions should be converted to mixed numbers. Use the Euclidean algorithm to find the GCF to simplify fractions. Organize the program with appropriate functions. The program will be submitted in C++, with pseudocode. Input: For each pair of fractions, accept input values for numerator 1, denominator 1, numerator 2, and denominator 2. The input data file is: P5Fractions.txt. All the input values are integers. Here are the fractions that will be added: Output: Print an appropriate header in the output file, and then print each pair of addend fractions and their sum. Note that negative signs should not be displayed in a denominator. If a mixed number is negative, print only one minus sign (i.e., print 1 1/4 rather than 1-1/4). If the final result is an integer, no fraction portion should be displayed. If the final result is only a fraction with no whole number part, do not print a whole number of o. Sample output 3/8 1/6 13/24 9/2 7/2 8/9 11/3 4 5/9 1/6 5/6 2/3 Suggestions: You might want to simplify the answer after combining the fractions. The following formula provides one way to add fractions: di di .Be particularly careful calculating the signs of the answers since the Euclidian algorithm may return a negative GCF
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
