So, I wrote the code and used a For/Next and it worked for the first line but I have to calculate each time for a new line. The first line is the only one that is correct when I do this. My professor said I should have used a Do While Loop instead and it would fix the problem. I know the equation and I know it should be held only to when the initial height is >= zero, but I have been having a terrible time figuring out how to turn it into a do while loop. If anyone could point me in the right direction or link a video that would help it would be greatly appreciated. I already have the calculations for the other buttons. Just need to figure out how to make the Do While Loop and online videos I’ve found haven’t helped.
First coding class to give you an idea of why I’m struggling with this, because it seems like it should be simple.