20 lines
462 B
Text
20 lines
462 B
Text
sub FloydTriangle (fila)
|
|
dim numColum(fila)
|
|
for colum = 1 to fila
|
|
numColum(colum) = len(str$(colum + fila * (fila - 1) / 2))
|
|
next colum
|
|
|
|
print "output for ", str$(fila), "\n"
|
|
thisNum = 1
|
|
for r = 1 to fila
|
|
for colum = 1 to r
|
|
print right$(" " + str$(thisNum), numColum(colum)), " ";
|
|
thisNum = thisNum + 1
|
|
next colum
|
|
print
|
|
next
|
|
end sub
|
|
|
|
FloydTriangle (5)
|
|
print
|
|
FloydTriangle (14)
|