Multiplication tables: Difference between revisions

Content added Content deleted
(Added Perl code)
(→‎{{header|Perl}}: -- Noticed 12 was hard set in a couple places, fixed.)
Line 229: Line 229:


print " x|";
print " x|";
for ($a=1; $a<=12; $a++) { printf(" %3d", $a); }
for ($a=1; $a<=$max; $a++) { printf(" %3d", $a); }
print "\n---+";
print "\n---+";
while ($b<48) { print "-"; $b++; }
while ($b<($max*4)) { print "-"; $b++; }
print "\n";
print "\n";
for ($i=1; $i<=$max; $i++) {
for ($i=1; $i<=$max; $i++) {