LISP program for the positive-negative test of a given number
kw.lisp
(write-line"———————————————————————————————————————————")(write-line"Program to check a number is +ve or -ve")(write-line"———————————————————————————————————————————")(princ"Enter the number ")(setqa(read))(if(=a0)(formatt"~%~d is neither +ve nor -ve "a))(if(>a0)(formatt"~%~d is +ve number "a))(if(<a0)(formatt"~%~d is -ve number "a))(terpri)(formatt"———————————————————————————————————————————")
Output
kodingwindow@kw:~$ clisp kw.lisp
———————————————————————————————————————————
Program to check a number is +ve or -ve
———————————————————————————————————————————
Enter the number -1
-1 is -ve number
———————————————————————————————————————————
kodingwindow@kw:~$ clisp kw.lisp
———————————————————————————————————————————
Program to check a number is +ve or -ve
———————————————————————————————————————————
Enter the number 0
0 is neither +ve nor -ve
———————————————————————————————————————————
kodingwindow@kw:~$
Dear User, Thank you for visitng Kodingwindow. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.
Dear User, We are grateful for your interest in the Kodingwindow Android app. We intend to soon make it available on the Google Play Store. Currently, Android versions 10 and up require manual apk installations. Would you like to get the app?