PROGRAM PROJECTILE !--------------------------------------------------------------------- ! This program calculates the velocity and height of a projectile ! given its initial height, initial velocity, and constant ! acceleration. Identifiers used are: ! INITIAL_HEIGHT : initial height of projectile ! HEIGHT : height at any time ! INITIAL_VELOCITY : initial vertical velocity ! VELOCITY : vertical velocity at any time ! ACCELERATION : vertical acceleration ! TIME : time since launch ! ! Input: INITIAL_HEIGHT, INITIAL_VELOCITY, TIME ! Output: VELOCITY, HEIGHT !--------------------------------------------------------------------- IMPLICIT NONE REAL :: INITIAL_HEIGHT, HEIGHT, INITIAL_VELOCITY, VELOCITY, & ACCELERATION = -9.807, & TIME ! Obtain values for HGHT0, VELOC0, and TIME PRINT *, "Enter the initial height and velocity:" READ *, INITIAL_HEIGHT, INITIAL_VELOCITY PRINT *, "Enter time at which to calculate height and velocity:" READ *, TIME ! Calculate the height and velocity HEIGHT = 0.5 * ACCELERATION * TIME ** 2 & + INITIAL_VELOCITY* TIME + INITIAL_HEIGHT VELOCITY = ACCELERATION * TIME + INITIAL_VELOCITY ! Display VELOCITY and HEIGHT PRINT *,"At time ", TIME, " the vertical velocity is ", VELOCITY PRINT *,"and the height is ", HEIGHT END PROGRAM PROJECTILE