3 - Define a LISP function to compute difference of
squares.
Implementation Code in LISP -
(defun
difsqr ( a b)
( if (>
a b)
(- (* a a) (*b b ))
(- (* b b) (* a a))))
OUTPUT-
(difsqr 3 4)
7
Implementation Code in LISP
(
(- (* a a) (*
(- (* b b) (* a a))))
OUTPUT-
(
7
No comments:
Post a Comment