(write-line"———————————————————————————————————————————")(write-line"Program to swap the given numbers")(write-line"———————————————————————————————————————————")(princ"Enter the 1st number a=")(setqa(read))(princ"Enter the 2nd number b=")(setqb(read))(write-line"After swapping...")(setqa(+ab))(setqb(-ab))(setqa(-ab))(terpri)(princ"a=")(writea)(terpri)(princ"b=")(writeb)(terpri)(formatt"———————————————————————————————————————————")
Output
kodingwindow@kw:~$ clisp kw.lisp
———————————————————————————————————————————
Program to swap the given numbers
———————————————————————————————————————————
Enter the 1st number a=10
Enter the 2nd number b=20
After swapping...
a=20
b=10
———————————————————————————————————————————
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.