Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The P5Fractions.txt is shown here! Easy-reading please!! Task: Add pairs of fractions and simplify the resulting sums. The program should be able to manage signed

image text in transcribedThe P5Fractions.txt is shown here!
image text in transcribedEasy-reading please!!
Task: Add pairs of fractions and simplify the resulting sums. The program should be able to manage signed numbers, like or unlike denominators, and input values of zero in either a numerator or a denominator. A zero denominator should be handled by printing an appropriate error message in the output file and not cause the program to end. 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: -25 41 17 10 -15 Output: Print an appropriate header in the output file, and then print each pair of addend fractions and their sum in the file. 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 Sample output 3/81/613/ 13/24 11/3-45/9 -5/6= -10/11= -18/11 8/9 + -9/11 +

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_2

Step: 3

blur-text-image_3

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

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Sham Navathe

4th Edition

0321122267, 978-0321122261

More Books

Students also viewed these Databases questions

Question

Brief the importance of span of control and its concepts.

Answered: 1 week ago

Question

What is meant by decentralisation?

Answered: 1 week ago

Question

1. Define mass and mediated communication

Answered: 1 week ago