Ad
  • Custom User Avatar

    Try adding a continue; after your k = k - 1;

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    I did end up liking this quite a bit because it made me do some math research. I think the initial equation you are given could be different. Instead of thinking about it like a programming problem, I thought of it as a physics problem which helped. That eliminated the use of the while or for loop. As a small hint: Find total flight time based of velocity and flight angle.

    Remember, since the object being thrown does not exceed terminal velocity (specifically initial velocity), flight time should be symmetrical.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution