Ok, so my assignment is to write a program that computes how many feet an object falls in 1 second, 2 seconds, etc., up to 12 seconds. The formula is: d = ½ * g * t^2 (t squared), where g = 32.2.
This is what I have managed to do but the values for the distance are wrong on my program.
It would be greatly appreciated if someone could tell me what went wrong and why as fast as you can. I am new to this programming stuff and have had some trouble with it. Thanks in advance.
... that is not how you call a function. The number you are outputting to cout is not the return value of the function. I recommend going back to your textbook and read up on how to call functions properly, because it's absolutely fundamental to C++ programming.