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.




 
#import std
#import nat
 
table "n" =
 
~&plrTS(
   ~&xS pad` @xS <'x  ','--'>-- --' | '*hS %nP* nrange/1 "n",
   ^CthPiC(`-!*h,~&) mat` *xSSK7 pad` *K7ihxPBSS (~&i&& %nP)** nleq&&product**iiK0lK2x nrange/1 "n")
 
#show+
 
main = table 12
 