(print "Enter a number") (terpri) (setf x (read)) (format t "Enter ~S numbers " x) (terpri) (setf flag 0) (setf my-array (make-array x)) (dotimes (y x) (setf (aref my-array y) (read)) ) (write-line "Enter a number to be searched") (setf q (read)) (dotimes (y x) (if (= (aref my-array y) q) (progn (write-line "Number found") (setf flag 1)) ) ) (if ( = flag 0) (format t "The number ~S doesnot exist" q) )
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more