program main integer n, i double precision PI25DT parameter (PI25DT = 3.141592653589793238462643d0) double precision pi, h, sum, x, f, a real difftime, t(2) c function to integrate f(a) = 4.d0 / (1.d0 + a*a) 10 write(6,98) 98 format('Enter the number of intervals: (0 quits)') read(5,99) n 99 format(i10) difftime = dtime(t) c check for quit signal if ( n .le. 0 ) goto 30 c calculate the interval size call fortran_call_integrate(n, pi) difftime = dtime(t) write(6, 96) pi, abs(pi - PI25DT) 96 format('pi is approximately: ', F18.16, + ', Error is: ', F18.16) write(6, 97) difftime 97 format('wall clock time = ', F18.6) goto 10 30 end