Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a Fortran program to print five tables (5) displaying the range that a bal

ID: 3672124 • Letter: W

Question

Write a Fortran program to print five tables (5) displaying the range that a ball would travel when it is thrown with an initial velocity v0 and angle .

One table should be calculated for each of the initial velocities: 0, 1, 10, 100, and 1000 meters per second.

The table should have one row for every 5 degrees for angles between 5 and 85 degrees inclusive.

Note that this assignment does not require a READ statement since all data required can be constructed into the program.

Nested DO loops are required to solve this problem. Do not unnecessarily duplicate code.

Columns should have appropriate headings.

White space should separate the tables.

Do not use formatted Output for the program.

If we assume negligible air friction and ignore the curvature of the earth, a ball that is thrown into the air from any point on the earth’s surface will follow a parabolic flight path.

The range (distance between the initial origin and final impact) is determined by the formula:

range = (-2Vo^2cos(tetha)sin(tetha))/g

where v0 is the initial velocity of the ball, is the angle of the throw, and g is the acceleration

due to the earth's gravity. The value for gravity should be defined as a constant and set to -9.81

meters per second.

Note, the intrinsic trigonometric functions work in radians, so the angle in degrees will need to

be converted to radians for the calculations. To convert degrees to radians:

radians =degrees(pie)/180

thank you

Explanation / Answer

! -------------------------------------------------------------------- ! Given t, the time since launch, u, the launch velocity, a, the ! initial angle of launch (in degree), and g, the acceleration due to ! gravity, this program computes the position (x and y coordinates) ! and the velocity (magnitude and direction) of a projectile. ! -------------------------------------------------------------------- PROGRAM Projectile IMPLICIT NONE REAL, PARAMETER :: g = 9.8 ! acceleration due to gravity REAL, PARAMETER :: PI = 3.1415926 ! you knew this. didn't you REAL :: Angle ! launch angle in degree REAL :: Time ! time to flight REAL :: Theta ! direction at time in degree REAL :: U ! launch velocity REAL :: V ! resultant velocity REAL :: Vx ! horizontal velocity REAL :: Vy ! vertical velocity REAL :: X ! horizontal displacement REAL :: Y ! vertical displacement READ(*,*) Angle, Time, U Angle = Angle * PI / 180.0 ! convert to radian X = U * COS(Angle) * Time Y = U * SIN(Angle) * Time - g*Time*Time / 2.0 Vx = U * COS(Angle) Vy = U * SIN(Angle) - g * Time V = SQRT(Vx*Vx + Vy*Vy) Theta = ATAN(Vy/Vx) * 180.0 / PI WRITE(*,*) 'Horizontal displacement : ', X WRITE(*,*) 'Vertical displacement : ', Y WRITE(*,*) 'Resultant velocity : ', V WRITE(*,*) 'Direction (in degree) : ', Theta END PROGRAM Projectile

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote