LISP program to calculate the square and cube of numbers
kw.lisp
Output
kodingwindow@kw:~$ clisp kw.lisp +--------+---------+------------+ |Numbers | Squares | Cubes | +--------+---------+------------+ 0 0 0 1 1 1 2 4 8 3 9 27 4 16 64 5 25 125 6 36 216 7 49 343 8 64 512 9 81 729 10 100 1000 +--------+---------+------------+ kodingwindow@kw:~$
What Next?
LISP program to find the min and max of two numbers
LISP program to swap the given numbers
LISP Control Statements
Advertisement