C
C  program 15
C
C  CWJ SDSU 2/7/05
C
C illustrates functions
C
C FUNCTIONS CALLED:
C   addpi:   adds pi to real number
C
      program program15

      implicit none

      real x  ! to be read in
      real y  ! to be printed out
      real addpi       ! must be declared

      print*,' Enter a real number '
      read*,x
      y=addpi(x)
      print*,' + pi = ',y
      end

CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
C  function addpi
C
C  adds pi to a real number
C
C  INPUT:
C   x
C
C  OUTPUT:
C   y = x+3.14159
C
      real function addpi(x)
      implicit none
      real x
    
      addpi=x+3.1415926
      return
      end



