program main ! This program calculates vertical motion under gravity implicit none ! Gravitational acceleration real, parameter :: g = 9.81 ! Variable Declarations real :: s ! dicplacement real :: u ! initial velocity real :: t ! time ! assigned values t = 5 u = 50 ! displacement s = u*t - (g*t*t)/2 print*, "displacement", s end program main
To embed this project on your website, copy the following code and paste it into your website's HTML: