Question: 1. Write a program in c utilizing the built in math function exp(). The program will use a loop to evaluate the following function for

1. Write a program in c utilizing the built in math function exp(). The program will use a loop to evaluate the following function for x = [0,5.0] in steps of 0.5.

Try to obtain the same output as below:

f(x) = e^(-2x)

f(0.0) = e^(-2*0.0) = 1.000

f(0.5) = e^(-2*0.5) = 0.368

f(1.0) = e^(-2*1.0) = 0.135

f(1.5) = e^(-2*1.5) = 0.050

f(2.0) = e^(-2*2.0) = 0.018

f(2.5) = e^(-2*2.5) = 0.007

f(3.0) = e^(-2*3.0) = 0.002

f(3.5) = e^(-2*3.5) = 0.001

f(4.0) = e^(-2*4.0) = 0.000

f(4.5) = e^(-2*4.5) = 0.000

f(5.0) = e^(-2*5.0) = 0.000

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!