Question: Using functions. Langauge C++ code blocks or Xcode CS 317 Functions 1. Write a program that will compute the distance an object will fall (traveling
Using functions.
Langauge C++ code blocks or Xcode
CS 317 Functions 1. Write a program that will compute the distance an object will fall (traveling down) for times of 1 second to 15 seconds. The formula is d /2gt where d is the distance in meters, g is 9.8 (gravity) and t is the amount of time in seconds that the object has been falling. Write a function named 'fallingDistance passing in the time as an argument. Print out the time and the distance in table format. The function will NOT have a loop in it. Write a function to print labels and another function to print one line of output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
