Skip to content

Instantly share code, notes, and snippets.

@shortsightedsid
shortsightedsid / multiplication-tables.lisp
Last active March 24, 2019 19:00
Print Multiplication Tables
;; Print Multiplication Tables
;;
;; This demonstrates CL's format function and it's ability
;; to print out Roman Numerals, Numbers in Words etc..
;;
;; Unlikely to be ever used!
(defun multiplication-table (number)
(loop for i from 1 below 12
do (format t "~10<~@r~;times~> ~:d = ~r~%" i number (* i number))