DECLARE FUNCTION exponentiate (x)DIM n, jINPUT "Enter n: ", nINPUT "Enter a: ", as = 0
FOR j = 0 TO ns = s + 1 / exponentiate(2 n LOG(a))NEXT j
PRINT s
FUNCTION exponentiate (x)exponentiate = EXP(x)END FUNCTION
DECLARE FUNCTION exponentiate (x)
DIM n, j
INPUT "Enter n: ", n
INPUT "Enter a: ", a
s = 0
FOR j = 0 TO n
s = s + 1 / exponentiate(2 n LOG(a))
NEXT j
PRINT s
FUNCTION exponentiate (x)
exponentiate = EXP(x)
END FUNCTION