Multiplication tables: Difference between revisions
Content added Content deleted
(CoffeeScript) |
(→{{header|CoffeeScript}}: minor refactor) |
||
Line 577: | Line 577: | ||
=={{header|CoffeeScript}}== |
=={{header|CoffeeScript}}== |
||
<lang coffeescript> |
<lang coffeescript> |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
print_multiplication_tables = (n) -> |
print_multiplication_tables = (n) -> |
||
width = 4 |
width = 4 |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
s = pad('') + '|' |
s = pad('') + '|' |
||
for i in [1..n] |
for i in [1..n] |
||
Line 607: | Line 608: | ||
print_multiplication_tables 12 |
print_multiplication_tables 12 |
||
</lang> |
</lang> |
||
output |
output |
||
Line 626: | Line 629: | ||
12| 144 |
12| 144 |
||
</lang> |
</lang> |
||
=={{header|Common Lisp}}== |
=={{header|Common Lisp}}== |