c
c   prompt.f 91/21/11 
c
c   Function which prompts the user for the integration parameters 
c

	function userinpt (a, b, points)

	integer*4 userinpt

	double precision a, b
	integer*4 points
        integer*4 i

    	print *
    	print *, '******************** INTEGRATION EXAMPLE **************
     >*********'
    	print *
    	print *, 'This Example uses the iPSC to calculate pi by integrati
     >ng    '
	print *, 'the function:'
    	print *, '		f(x) = 4 / (1 + x**2)'
    	print *, 'between x=0 and x=1.'
    	print *, 'The method used is the n-point rectangle quadrature rul
     >e.'
	print *
	write(6,99)
99	format(' How many points do you want (0 or neg. value quits)? ')
	read (5, 110) points
110	format(i10)

    	a = 0.0
    	b = 1.0
        i = 0
    	
	if (points .gt. 0) then 
	     i = 1
    	else 
	     i = 0
	endif

	userinpt = i
	return 
	end
