Notes:

• Make sure every line of your code has a comment that explain what it does.

• Submit the c++ code (all files with extensions .cpp or .h), the text file created and the graph through Blackboard.

• write the two functions in a separate .cpp file and write the declarations in a separate .h file and include it into your main program.

Problem 1:

Write a C++ function that receives an argument x and returns the calculated value of your function. Name your function myfunc. The format of the function heading should look like: double myfunc(double x)

Problem 2:

Write a function that writes the values of your function with the format indicated in Homework 1. The function should receive the bracket and the interval of the values that will be written in the file and the name of the file to be created as arguments. The format of the function heading should look like: void writemyfunc(string filename, double start, double end, double interval=0.01)

Problem 3

Modify your program in Homework 1 to use these functions to reproduce the same results as in HW1. For example the statement calling the writemyfunc function is the main() function should look something like: writemyfunc(“output.txt”,0,1,0.01)

my equation :

f(x) = (1 + x)e −x

Looking for solution of this Assignment?

WHY CHOOSE US?

We deliver quality original papers

Our experts write quality original papers using academic databases.We dont use AI in our work. We refund your money if AI is detected  

Free revisions

We offer our clients multiple free revisions just to ensure you get what you want.

Discounted prices

All our prices are discounted which makes it affordable to you. Use code FIRST15 to get your discount

100% originality

We deliver papers that are written from scratch to deliver 100% originality. Our papers are free from plagiarism and NO similarity.We have ZERO TOLERANCE TO USE OF AI

On-time delivery

We will deliver your paper on time even on short notice or  short deadline, overnight essay or even an urgent essay