Write a computer program that computes the duration of a projectile’s flight and its height above the ground when it reaches the target. As part of your solution, write and call a function that displays instructions to the program user.
Problem ConstantG = 32.17 // gravitational constantProblem Inputfloat theta // input - angle (radians) of elevationfloat distance // input - distance (ft) to targetfloat velocity // input - projectile velocity (ft/sec)Problem Outputsfloat time // output - time (sec) of flightfloat height // output - height at impactRelevant Formulastime =
height = velocity ×sin(theta) ×time –
Try your program on these data sets.
Inputs | Data Set 1 | Data Set 2 |
Angle of elevation | 0.3 radian | 0.71 radian |
Velocity | 800 ft/sec | 1,600 ft/sec |
Distance to target | 11,000 ft | 78,670 ft |
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.