My code will compile, but will not populate the table, or it runs an infinite loop. This version shows the empty table. The infinite loop happens when i move the fallDistance function outside of the for loop. I thought it needed a while loop since the value of seconds and meters weren't determined.
My textbook is only pseudocode, the C++ Language Companion is very sparse. I have 3 C++ books I have been consulting for, oh gee, let's say the last 6 hours.
Please help me find where it is out of sequence or whatever I've done wrong. This is the first problem using srand(), time(0, and the #include <cstdlib> and #include <ctime>
Line 44: I copied that from the Celsius to Fahrenheit program I had written for another assignment because I thought that may have been a missing piece. -- took that out
Line 58: I set the seconds to 10, that only displayed 10. I renamed the variables of the function and that made it display correctly but only 1 second. Then I uninitialized those variables and it worked!
The program is to calculate how far (in meters) a star falls per second ( ranging from (1-10 seconds). I should start writing that at the top.