21 lines
348 B
Text
21 lines
348 B
Text
get "libhdr"
|
|
|
|
let width(n) = n<10 -> 1, 1 + width(n/10)
|
|
|
|
let floyd(rows) be
|
|
$( let maxno = rows * (rows+1)/2
|
|
let num = 1
|
|
for r = 1 to rows
|
|
$( for c = 1 to r
|
|
$( writed(num, 1 + width(maxno-rows+c))
|
|
num := num + 1
|
|
$)
|
|
wrch('*N')
|
|
$)
|
|
$)
|
|
|
|
let start() be
|
|
$( floyd(5)
|
|
wrch('*N')
|
|
floyd(14)
|
|
$)
|