Task

Produce a formatted   12×12   multiplication table of the kind memorized by rote when in primary (or elementary) school.



Only print the top half triangle of products.




begin
    % print a school style multiplication table                              %
    i_w := 3; s_w := 0; % set output formating                               %
    write( "    " );
    for i := 1 until 12 do writeon( " ", i );
    write( "   +" );
    for i := 1 until 12 do writeon( "----" );
    for i := 1 until 12 do begin
        write( i, "|" );
        for j := 1 until i - 1 do writeon( "    " );
        for j := i until 12    do writeon( " ", i * j );
    end;
 
end.