C     This program prints the values of the function
C     f(x) = cos(x) + sin(x)*exp(-x*x/2)
C     at n points on an interval given by the user.
      PROGRAM ex001
      IMPLICIT NONE
      INTEGER i, n
      REAL x, xi, xf, dx, y
      WRITE(*,*) "Numerical Programming Ex. 1.3"
      WRITE(*,*) "Give start and end points ",
     $     "and the number of points."
      READ(*,*) xi, xf, n
      dx = (xf-xi) / (n-1)
      DO 1000, i = 0, n-1
         x = xi + i*dx
         y = COS(x) + EXP(-.5*x**2)*SIN(x)
         WRITE(*,*) x, y
 1000 CONTINUE
      END


      
      
