'FUNCTION-Demo DECLARE FUNCTION nteWurzel# (Zahl AS DOUBLE, n AS DOUBLE) DEFDBL A-Z COLOR 15, 1 CLS PRINT "Von welcher Zahl soll die n-te Wurzel ausgerechnet werden"; COLOR 14 INPUT Zahl PRINT COLOR 15 PRINT "Wieviel ist n"; COLOR 14 INPUT n PRINT COLOR 15 IF n = 0 THEN PRINT "Die 0-te Wurzel kann nicht ausgerechnet werden!" ELSE PRINT "Die n-te Wurzel der Zahl ist"; COLOR 14 PRINT nteWurzel#(Zahl, n); COLOR 15 PRINT "." END IF DEFDBL A-Z FUNCTION nteWurzel# (Zahl AS DOUBLE, n AS DOUBLE) nteWurzel# = Zahl ^ (1 / n) END FUNCTION