Exercise: Write a C++ program to add two fractions and display the result fraction. Your program will prompt the user to input fraction 1 and fraction 2. The numerator and denominator of each fraction are input separately by space. See the example output below. You will need to use a C++ structure to define a fraction. The structure has two members: numerator and denominator.
Enter fraction 1(numerator denominator): 1 2
Enter fraction 2(numerator denominator): 2 5
This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages: