logo CodeStepByStep logo

calculate_displacement

Language/Type: C Math return
Author: Allison Obourn (on 2020/09/14)

Write a function called calculate_displacement that accepts three real numbers as parameters and computes and returns the change in position. The parameters represent velocity, acceleration and time. You can calculate displacement using the following formula:

Displacement = velocity * time + ½ * acceleration * time^2

Function: Write a C function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.