Multiplication tables: Difference between revisions
Content added Content deleted
(+Icon+Unicon) |
m (→{{header|Icon}}: cleaned up contraction) |
||
Line 922:
lim := 13
wid := 5
every writes(right("* |" | (1 to lim) | "\n",wid)|right("\n",wid*(lim+1),"_")) # header
every (i := 1 to lim) &
writes(right( i||" |" | (j := 1 to lim,
end </lang>
The above example is a somewhat exaggerated example of contractions. In both cases 'every' is used to force all alternatives including row labels, column headings, content, line terminators. The upper triangle is produced by embedding an 'if' expression inside the object of an 'every' (normally an error prone construct which would malfunction if not
Line 945:
12 | 144 156
13 | 169 </pre>
==={{header|Unicon}}===
|