Write a lisp code to check even or odd-programmingraja

 Aim: Write a lisp code for calculate whether the given number is even or odd.

Software Used: GNU common LISP

coding:

> (defun CHECK (X)

   ( format t " your Number is")

   (cond((and (evenp x)) 'odd)

  ((and (oddp x)) 'even)

  )

  )

CHECK






Post a Comment

0 Comments