about | help | code help+videos | done | prefs |
Artillery - The distance to the landing point of the projectile. It is launched at an angle, given in degrees and must be converted into radians with an initial velocity (velocity in feet per second), ignoring air resistance. The distance is given by the formula: distance = (velocity^2*sin(2*angle))/32.2 If the projectile comes within 1% of the distance to the target, return true. If the projectile doesn’t come close enough, return false. The method receives an integer for the angle, integer for initial velocity, and integer for distance. artillery(20, 100, 200) → true artillery(25, 100, 240) → true artillery(60, 250, 1699) → false ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 125
Copyright Nick Parlante 2017 - privacy