Guest User

Untitled

a guest
Dec 14th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. (setq beer-num 99)
  2. (setq container "bottles")
  3.  
  4. (loop while (> beer-num 0) do
  5. (format t "~a ~a of beer on the wall.~%" beer-num container)
  6. (format t "~a ~a of beer.~%" beer-num container)
  7. (format t "Take one down.~%")
  8. (format t "Pass it around.~%")
  9.  
  10. (setq beer-num (- beer-num 1))
  11.  
  12. (if (= beer-num 1)
  13. (setq container "bottle"))
  14.  
  15. (if (> beer-num 0)
  16. (format t "~a ~a of beer on the wall.~%" beer-num container)
  17. (format t "No more of beer on the wall.~%")))
Add Comment
Please, Sign In to add comment