RosettaCodeData/Task/Multiplication-tables/Tailspin/multiplication-tables.tailspin
2023-07-01 13:44:08 -04:00

11 lines
330 B
Text

templates formatN&{width:}
[ 1..$width -> ' ', '$;'... ] -> '$(last-$width+1..last)...;' !
end formatN
' |$:1..12 -> formatN&{width: 4};
' -> !OUT::write
'--+$:1..12*4 -> '-';
' -> !OUT::write
1..12 -> \( def row: $;
'$ -> formatN&{width:2};|$:1..($-1)*4 -> ' ';$:$..12 -> $*$row -> formatN&{width:4};
' ! \) -> !OUT::write