Question: Write a program that determines the range of a projectile using this formula: range=sin(2*angle)*velocity^2/gravity. Where angle is the angle of the projectile's path in(radians),velocity is

Write a program that determines the range of a projectile using this formula: range=sin(2*angle)*velocity^2/gravity.

Where angle is the angle of the projectile's path in(radians),velocity is the intial velocity of the projectile(in meters per second), and gravity is acceleration at 9.8 meters per second(a constant).

The takeoff angle must be input in degrees.Therfore you must convert this angle to its rading equiavelent. This is necessary because the trionmentric function sin(X) assumes the argument (x) is and angle expressed in radians. An angle in degrees can converted to radians by multiplying the number of degrees by pi/180 where pi = 3.14159. For example, 45degree= 45*3.14159/180 or 0.7853975 radians. The velocity is presumed to be input in meters per second. Make your interactive dialogue look like this:

Takeoff angle(in degrees)? 45.0

Intial velocity(meters per second)?100.0

Range = 1020.41 meters

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!