Hi, I'm trying to write a code to read the input of a towers height and then calculate how long it would take an object to hit the ground. I need to ask the user for what time intervals they would like(i.e every second, half-second, or tenth-second. It will then display the current height of the falling object as well as the time the object has fallen.
This is what I have so far and it doesn't want to compile. Can someone tell me and explain what I am doing wrong.
Yes, why don't you initialize your variables before using them? It seems you are trying to tell the computer what you want it to do instead of how to do it... :)
You need to update distance *inside* the loop...