You are on page 1of 1

Projectile Motion of a particle

open(1,file='proj.dat')
write(*,*)'Angle (in degree) and initial speed?' read(*,*)theta,v0 dt=0.01 g=980
theta=3.14/180*theta fx=0 fy=-g vx=v0*cos(theta) vy=v0*sin(theta) x=0 y=0 do
while(y.gt.0.0) dvx=fx*dt dvy=fy*dt vx=vx+dvx vy=vy+dvy dx=vx*dt
dy=vy*dt
x=x+dx y=y+dy write(1,*)x,y enddo stop end

You might also like