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 
print*, "enter the valeus of u,t"
read*, u,t 

! displacement
s = u*t - (g*t*t)/2
print*, "displacement", s 
end program main

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: