      PROGRAM PRO2P3
C...
C...  EULER INTEGRATION OF EQUATION (1.7) USING EQUATION (2.2)
C...
C...  OPEN INPUT/OUTPUT FILES
      OPEN(1,FILE='INPUT')
      OPEN(2,FILE='OUTPUT')
C...
C...  STEP THROUGH A SERIES OF RUNS FOR DIFFERENT INTEGRATION
C...  INTERVALS
      NCASES=5
      DO 2 NCASE=1,NCASES
C...
C...  (1)  INITIALIZATION
C...
C...       INDEX I
           I=0
C...
C...       TIME
           T=0.
C...
C...       INITIAL HEIGHT
           H0=100.
           H=H0
C...
C...       INTEGRATION INTERVAL
           IF(NCASE.EQ.1)THEN
               DT=50.
               INC=1
           ELSE IF(NCASE.EQ.2)THEN
               DT=25.
               INC=2
           ELSE IF(NCASE.EQ.3)THEN
               DT=5.
               INC=10.
           ELSE IF(NCASE.EQ.4)THEN
               DT=1.
               INC=50
           ELSE IF(NCASE.EQ.5)THEN
               DT=0.1
               INC=500
           END IF
C...
C...       TOTAL NUMBER OF INTERVALS
           ITOTAL=20*INC
C...
C...       MODEL PARAMETERS
           AC=5000.
           Q0=10000.
           CV=500.
           A= Q0/AC
           B=-CV/AC
C...
C...       INITIAL DERIVATIVE
           DHDT=(A+B*SQRT(H))
C...
C...  (2)  PRINT THE SOLUTION
C...
1          IF((I/INC*INC).EQ.I)WRITE(2,10)T,H,DHDT
10         FORMAT(20X,F10.0,F10.1,F10.3)
C...
C...  (3)  TAKE A STEP ALONG THE SOLUTION USING EQUATION (2.2)
C...
           H=H+DHDT*DT
           T=T+DT
           I=I+1
C...
C...  (4)  EVALUATE THE ODE DERIVATIVE
C...
           DHDT=(A+B*SQRT(H))
C...
C...  (5)  CHECK IF I = ITOTAL
C...
           IF(I.LE.ITOTAL)THEN
              GO TO 1
           ELSE
C...
C...          PRINT THE INTEGRATION INTERVAL
              WRITE(2,11)DT
11            FORMAT(//,23X,'INTEGRATION INTERVAL = ',F6.1,////)
           END IF
C...
C...  GO ON TO THE NEXT CASE
2     CONTINUE
      STOP
      END
