! ===================================================   
! Demo function calling another function
! ===================================================
   PROGRAM Demo
   IMPLICIT NONE

   include "func.h"
   include "SerieSum.h"

   INTEGER :: x, y, sum

   print*, "Program somputes f(a) + f(a+1) + ... + f(b)"
   print*, "Start number a = "
   read*, x
   print*, "End number b = "
   read*, y

   sum = SerieSum(f, x,y)	      ! *** Pass f to SerieSum 

   print*, "Serie sum = ", sum
   print*
   STOP
   END

