RosettaCodeData/Task/Multiplication-tables/Hexiscript/multiplication-tables.hexi

20 lines
410 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
fun format n l
let n tostr n
while len n < l; let n (" " + n); endwhile
return n
endfun
print " |"
for let i 1; i <= 12; i++; print format i 4; endfor
print "\n --+"
for let i 1; i <= 12; i++; print "----"; endfor
println ""
for let i 1; i <= 12; i++
print format i 3 + "|"
for let j 1; j <= 12; j++
if j < i; print " "
else print format (i * j) 4; endif
endfor
println ""
endfor