Multiplication tables: Difference between revisions
m
→{{header|Raku}}: condense code layout
No edit summary |
SqrtNegInf (talk | contribs) m (→{{header|Raku}}: condense code layout) |
||
Line 6,058:
=={{header|Raku}}==
(formerly Perl 6)
<lang perl6>(my $f = "%{$_}s" given my $width = ($_**2).chars ) given my $max = 12;
▲say 'x'.fmt($f), '│ ', (1..$max).fmt($f);
▲say '─' x $width, '┼', '─' x $max*$width + $max;
for 1..$max -> $i {
say $i.fmt($f)
}</lang>
{{out}}
<pre>
|