PROGRAM ParabolaLength
   IMPLICIT NONE

   REAL  :: Height, Base, Length
   REAL  :: temp, t

! Read in Hight and Base

   WRITE(*,*) 'Hight of the parabola: '
   READ(*,*)  Height

   WRITE(*,*) 'Base of the parabola: '
   READ(*,*) Base

!  temp and t are temporary variables
!  used to reduce calculations
!  calculate 2h and 4h**2+b**2
!  then solve for length

   t      = 2.0 * Height
   temp   = SQRT( t ** 2 + Base ** 2 ) 
   Length = temp + (base ** 2 / t) * LOG(( t + temp ) / Base ) 

! output the results

   WRITE(*,*)
   WRITE(*,*) 'Height = ', Height
   WRITE(*,*) 'Base   = ', Base
   WRITE(*,*) 'Length = ', Length

END PROGRAM ParabolaLength
