Question: Pls use the beginner C++ code Write a program to evaluate the following function f(x) = 3 log(2x) g(x) = 4f3(x) Your program should employ
Write a program to evaluate the following function f(x) = 3 log(2x) g(x) = 4f3(x) Your program should employ two functions where the actual computations are being done. You could call these functions anything you like. Here is what needs to be done: 1. In one function calculate f(x) by asking the user to enter x value and pass it to the function where f(x) is being calculated. The result is returned to the main using the return statement. 2. In another function calculate g(x) where the value of f(x) previously calculated is passed to it. This function should not return the calculated g(x) instead it should use the pass-by-reference method to make it available in the main function. 3. Print both f(x) and g(f(x) from the main function with appropriate headings Print the x, f, and g values into a data file called mydata.txt using the ofstream. 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
