MODULE const INTEGER, PARAMETER :: dp = KIND(1.0d0), sp = KIND(1.0e0) REAL(KIND=dp), PARAMETER :: dpi = 3.141592653589793d0 END MODULE const !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! PROGRAM prog USE const IMPLICIT NONE ! ! Program to subdivide the inveral [a,b] into ! n equal parts. For this example, the interval ! is [0,1] ! ! Method 2: Add a multiple of h to a. ! INTEGER :: n,i REAL(KIND=dp) :: a,b,h,x a = 0 b = 1 ! Get n WRITE(*,*) 'Input n' READ(*,*) n ! Get step size h = (b-a)/n ! Generate points DO i = 1,n+1 x = a + (i-1)*h WRITE(*,*) 'x = ',x ENDDO END PROGRAM prog