Data update
This commit is contained in:
parent
0df55f9f24
commit
aec8ed51b6
1045 changed files with 18889 additions and 2777 deletions
22
Task/Floyds-triangle/True-BASIC/floyds-triangle.basic
Normal file
22
Task/Floyds-triangle/True-BASIC/floyds-triangle.basic
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
SUB floydtriangle (fila)
|
||||
DIM numcolum(0)
|
||||
MAT REDIM numcolum(fila)
|
||||
FOR colum = 1 TO fila
|
||||
LET numcolum(colum) = LEN(STR$(colum+fila*(fila-1)/2))
|
||||
NEXT colum
|
||||
PRINT "output for "; STR$(fila)
|
||||
PRINT
|
||||
LET thisnum = 1
|
||||
FOR r = 1 TO fila
|
||||
FOR colum = 1 TO r
|
||||
PRINT (" " & STR$(thisnum))[LEN(" " & STR$(thisnum))-numcolum(colum)+1:maxnum]; " ";
|
||||
LET thisnum = thisnum+1
|
||||
NEXT colum
|
||||
PRINT
|
||||
NEXT r
|
||||
END SUB
|
||||
|
||||
CALL FLOYDTRIANGLE (5)
|
||||
PRINT
|
||||
CALL FLOYDTRIANGLE (14)
|
||||
END
|
||||
Loading…
Add table
Add a link
Reference in a new issue