Task

Calculate the value of   e.



(e   is also known as   Euler's number   and   Napier's constant.)



See details: Calculating the value of e

 
100 REM COMPUTE E VIA INVERSE FACTORIAL SUM
110 N = 11:REM NUMBER OF ITERATIONS
120 E =  1:REM APPROXIMATE E HERE
130 F =  1:REM BUILD FACTORIAL HERE
140 FOR I = 1 TO N
150 : F = F*I
160 : E = E + 1/F
170 NEXT I
180 PRINT "AFTER" N "ITERATIONS, E =" E