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

19 lines
410 B
Text

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