Question: hello i am trying to solve this problem with this program the output is posted below wich is what my output is supposed to look


f(x) 3x + 5 g(x) = 3x/5 + 1 f-1(y) = (y-5)/3 8-1(y) = (5y-5)/3 g(x) fInv(y) gInv(y) f(g(x)) g(f(x)) fInv(f(x)) gInv(g(x)) f(x) 3.00 6.50 1.00 0.00 5.00 18.00 6.00 -4.00 14.00 24.50 8.00 5.00 20.00 59.00 23.00 - 7.00 2.80 4.90 1.60 1.00 4.00 11.80 4.60 -1.40 -0.67 0.50 -1.33 -1.67 0.00 4.33 0.33 -3.00 3.33 9.17 0.00 -1.67 6.67 28.33 8.33 -8.33 13.40 19.70 9.80 8.00 17.00 40.40 18.80 0.80 9.40 15.70 5.80 4.00 13.00 36.40 14.80 -3.20 3.00 6.50 1.00 0.00 5.00 18.00 6.00 -4.00 3.00 6.50 1.00 0.00 5.00 18.00 6.00 -4.00 PURPOSE: Reinforce the concepts of functions; also uses while leof loop pattern and iomanip.h in C++. PROBLEM: For this program, you will read integers from an input file. For each integer, you will evaluate several functions, their inverses, function compositions and function compositions with their inverses. Specific requirements: Create a program lastname_prog2Orig.cpp for functions fand g shown in my sample input below. Print the functions and determine (by hand) their inverses and print them. You may not use arrays or vectors. All of the calculations are done "on-the-fly. Have Six functions - one for opening files, one for printing the headings, four for the functions. Make input values double. Use a leof loop. Values must be formatted so decimal points line up. Use the filenames specified in this assignment. Rewrite the program with a different pair of functions. To do this: o Open your file lastname_prog2Orig.cpp and save as lastname_prog2Mod.cpp in the same folder project folder. Remove the original program from the project in solution explorer (do NOT delete it), and add existing file for the modified program to solution explorer. Change your functions f and g based on the first letter in your last name as described below: o A-K f(x) - 4x + 1 g(x) = x - 1 f(x) = x + 6 g(x) = 7x INPUT FILE: P2Fn.dat for both your original and modified programs: 3 6.5 1 @ OL-Z 5 18 6 -4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
