Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/clisp
- (defun greenbottles (x)
- (loop for i downto 0 from x do
- (if (not (= i 0))
- (format t "~A green bottles sitting on the wall~%~A green bottles sitting on the wall~%and if one green bottle should accidentally fall there'll be ~A green bottles left on the wall ~%" i i (- i 1))
- (format t "there are no more green bottles sitting on the wall"))))
- (if *args*
- (greenbottles (parse-integer (car *args*)))
- (progn
- (format t "please enter the start number of bottles~%")
- (greenbottles (read))))
Advertisement
Add Comment
Please, Sign In to add comment