Menu

Unic 4 Following Program Adds Two Fractions Displays Result Sum Fraction Program Prompts U Q43889243

c++
UNIC 4. The following program adds two fractions and displays the result sum fraction. The program prompts the user to inputUNIC 4. The following program adds two fractions and displays the result sum fraction. The program prompts the user to input fraction 1 and fraction 2. There is a structure that has two members numerator, denominator and a function. There are some errors in the program (syntactic, logical, etc). Correct them by underlining the line where you think there is a mistake andre write that line in its correct form. There are 5 lines that have errors. include <iostream> using namespace std; stret Tract (15 points) int int deno Fract sum (Fract) int main() int numi, denol, num2, deno2 cout>”Enter fraction 11 numerator denominator cinnuml> denol cout<<“Enter fraction 2 inumerator denominatori” cin>>num2 >>deno2; Fract fl-numi, denol); /* 1/2 +/ Fract 2 num2, deno21/ 2/5 / Fract result – sum ti, 21//sum the fractions cout<<num<<“/”<<denoccendl; //display the result system/”pause”); return 0; Fract sum (Fract fl, Fract [2) Fract result-tf.num. 12.deno) + return result; f2.num. f1.deno), f1.deno 12.deno); Show transcribed image text UNIC 4. The following program adds two fractions and displays the result sum fraction. The program prompts the user to input fraction 1 and fraction 2. There is a structure that has two members numerator, denominator and a function. There are some errors in the program (syntactic, logical, etc). Correct them by underlining the line where you think there is a mistake andre write that line in its correct form. There are 5 lines that have errors. include using namespace std; stret Tract (15 points) int int deno Fract sum (Fract) int main() int numi, denol, num2, deno2 cout>”Enter fraction 11 numerator denominator cinnuml> denol coutnum2 >>deno2; Fract fl-numi, denol); /* 1/2 +/ Fract 2 num2, deno21/ 2/5 / Fract result – sum ti, 21//sum the fractions cout

Expert Answer


Answer to UNIC 4. The following program adds two fractions and displays the result sum fraction. The program prompts the user to i…

OR