(write-line"———————————————————————————————————————————")(write-line"Program to perform the arithmetic operations")(write-line"———————————————————————————————————————————")(formatt"Enter the 1st number ")(setqa(read))(formatt"Enter the 2nd number ")(setqb(read))(princ"—————————————————————————")(formatt"~%Addition | ~d"(+ab))(formatt"~%Subtraction | ~d"(-ab))(formatt"~%Multiplication | ~d"(*ab))(formatt"~%Division | ~d"(/ab))(terpri)(formatt"———————————————————————————————————————————")
Output
kodingwindow@kw:~$ clisp kw.lisp
———————————————————————————————————————————
Program to perform the arithmetic operations
———————————————————————————————————————————
Enter the 1st number 50
Enter the 2nd number -10
—————————————————————————
Addition | 40
Subtraction | 60
Multiplication | -500
Division | -5
———————————————————————————————————————————
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.