Question: Programming problem #1 Upload Assignment Che a New Tab Search / e Chegg: Problem Solving > d https://ereader.chegg.com/#/books/9780133001327/cfi/385l/4/4@0.00:35.7 3. Write an algorithm for a

Programming problem #1
Upload Assignment Che \ a New Tab Search / e Chegg: Problem Solving > d https://ereader.chegg.com/#/books/9780133001327/cfi/385l/4/4@0.00:35.7 3. Write an algorithm for a function addFrac that computes and returns through its two outputs the sum of two fractions passed as its inputs Programming 1. Write the function sumDiff in Self-Check Exercise 1 as two separate functions sum and diff that take two input arguments. Function surm performs the addition, and function diff performs the subtraction. Rewrite the main function to use sum and diff to compute the same results as before 2. Write function doFrac that returns a string representing a common frac- tion given its numerator and denominator as input arguments and also returns the decimal value of the function. If the input arguments are 1 and 4, the string should be "1/4" and the decimal value should be 0.25. Make sure you don't use integer division to calculate the decimal value (1 / 4 is 0 using integer division) 3. Write and test a function multiplyFrac that has four inputs repre- 351 Problem Solving, Abstraction, and Design using C++,6/e 3:11 PM qx 11/1/2017 Type here to search ^
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
