From 2487b3472c1608b6444064d85c96ef64841475d9 Mon Sep 17 00:00:00 2001 From: Xevion Date: Mon, 2 Mar 2020 00:48:53 -0600 Subject: [PATCH] prompting script --- test.lisp | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test.lisp diff --git a/test.lisp b/test.lisp new file mode 100644 index 0000000..2ad55d3 --- /dev/null +++ b/test.lisp @@ -0,0 +1,11 @@ +(defun read-3-numbers-&-format-sum () + (flet ((prompt (string) + (format t "~&~a: " string) + (finish-output) + (read nil 'eof nil))) + (let ((x (prompt "first number")) + (y (prompt "second number")) + (z (prompt "third number"))) + (format t "~&the sum of ~a, ~a, & ~a is:~%~%~a~%" + x y z (+ x y z))))) +(read-3-numbers-&-format-sum) \ No newline at end of file