program main implicit none external xsquare call tabelle (xsquare, -20, 20, 1); end program integer function xsquare ( x ) integer x; xsquare = x**2; return; end function integer function myfunc ( k ) implicit none integer k myfunc = (2*(k**2) + 4*k + 3) end function subroutine tabelle ( f, start, endw, step ) implicit none integer start, endw, step, f integer k if (step .LT. 1) then step = 1 endif ! Tabellenkopf write (*,*) "+-------------------+" write (*,*) "| x | y |" write (*,*) "+-------------------+" ! x-y-Wertepaare ausgeben do k=start, endw, step write (*, '(1X,2H| ,I7,3H | , I7, 2H |)') k, f(k) enddo write (*,*) "+-------------------+" end subroutine