Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun greenbottles (x)
- (cond
- ((> x 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 ~%" x x (- x 1)) (greenbottles (- x 1)))
- (t (format t "there are no more green bottles sitting on the wall"))))
- (cond
- (*args* (greenbottles (parse-integer (car *args*))))
- (t (format t "please enter how many bottles~%")(greenbottles (read))))
Advertisement
Add Comment
Please, Sign In to add comment