program prog082 ..... 10 continue call onestep(x,y,vx,vy,t,dt,ga) ..... if( y .ge. 0.0d0 ) goto 10 c call solvey0(x,y,vx,vy,t,ga) xf=x write(*,100) theta, xf, t .... end c ********************************************************************** subroutine solvey0(x,y,vx,vy,t,ga) c ********************************************************************** ..... c eps = 1.0d-10 do n = 1, 1000 if(abs(y).lt.eps) goto 20 dt = ..... call onestep(x,y,vx,vy,t,dt,ga) ! 時間を dt だけ進ませる enddo write(*,*) " I cannot find the position where y = 0." 20 continue c end