program plotfun implicit none integer:: i,n real:: x,x0,x1,dx,yf1,yf2,f1,f2 read(5,*)x0,x1,n dx=(x1-x0)/(n-1) do i=1,n x=x0+(i-1)*dx yf1=f1(x) yf2=f2(x) write(6,100)x,yf1,yf2 100 format(3(x,f8.4)) enddo end program plotfun real function f1(xarg) implicit none real ::xarg real ::p1,p2,p3 xarg=xarg+1 p1=xarg p2=(xarg)**2 p3=(xarg)**3 f1=p1+p2+p3 end function f1 real function f2(xarg) implicit none real ::xarg f2=xarg end function f2