Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ UNIC 4. The following program adds two fractions and displays the result sum fraction. The program prompts the user to input fraction 1 and

c++
image text in transcribed
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 cout>num2 >>deno2; Fract fl-numi, denol); /* 1/2 +/ Fract 2 num2, deno21/ 2/5 / Fract result - sum ti, 21//sum the fractions cout

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions