Write a lisp code to find value of exponential-programmingraja

 

Aim: Write a lisp code to find value of exponential (a n). (Using function).

Software Used: Gnu Common LISP

coding:

>(defun power (x y)

(if (= y 0) 1

(* x(power c(- y 1)))))


POWER


>(power 2 4)


16


OUTPUT :



Post a Comment

0 Comments