RosettaCodeData/Task/Floyds-triangle/Run-BASIC/floyds-triangle.basic
2023-07-01 13:44:08 -04:00

14 lines
294 B
Text

input "Number of rows: "; rows
dim colSize(rows)
for col=1 to rows
colSize(col) = len(str$(col + rows * (rows-1)/2))
next
thisNum = 1
for r = 1 to rows
for col = 1 to r
print right$( " "+str$(thisNum), colSize(col)); " ";
thisNum = thisNum + 1
next
print
next