      program prog081
c
c     Gravitational Fall Problem with Air Friction
c     subroutines:
c        onestep(x,y,vx,vy,t,dt,ga)
c        force(vx,vy,fx,fy,ga)
c
      implicit real*8 (a-h,o-z)
c Constants and Default Parameters
      pi    = 4.0d0*atan(1.0d0)
      dt    = 0.02d0
      a     = 0.1d0
c
      v0    = 20.0d0
      theta = 45.0d0
      gam   = 1.0d0
c
c パラメータを読み込む
c     write(*,800) "# v0, gam, theta = ?"
c     read(*,*) v0, gam, theta
c
      write(*,800) "# v0, gam, theta = ", v0, gam, theta
 800  format(a, 3(1x,f15.7))
c
c 初期値を与える
      t  = 0.0d0
      x  = 0.0d0
      y  = 0.0d0
      vx = v0*cos(theta*pi/180)
      vy = v0*sin(theta*pi/180)
      ga = gam*a*a
c
c 時間発展を解く
         write(*,100) x,y,t
 10   continue
         call onestep(x,y,vx,vy,t,dt,ga)
         write(*,100) x,y,t
      if( y .ge. 0.0d0 ) goto 10
 100  format(3(1x,f15.7))
      end
