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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started