Data update
This commit is contained in:
parent
35bcdeebf8
commit
74c69a0df6
2427 changed files with 31826 additions and 3468 deletions
34
Task/Cantor-set/True-BASIC/cantor-set.basic
Normal file
34
Task/Cantor-set/True-BASIC/cantor-set.basic
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
LET ancho = 81
|
||||
LET alto = 5
|
||||
DIM intervalo$(0,0)
|
||||
MAT REDIM intervalo$(0 TO alto, 0 TO ancho)
|
||||
|
||||
SUB cantor
|
||||
FOR i = 0 TO alto-1
|
||||
FOR j = 0 TO ancho-1
|
||||
LET intervalo$(i, j) = "#" !CHR$(254)
|
||||
NEXT j
|
||||
NEXT i
|
||||
END SUB
|
||||
|
||||
SUB conjcantor (inicio,longitud,indice)
|
||||
LET segmento = INT(longitud/3)
|
||||
IF segmento = 0 THEN EXIT SUB
|
||||
FOR i = indice TO alto-1
|
||||
FOR j = inicio+segmento TO inicio+segmento*2-1
|
||||
LET intervalo$(i, j) = CHR$(32) !" "
|
||||
NEXT j
|
||||
NEXT i
|
||||
CALL conjcantor (inicio, segmento, indice+1)
|
||||
CALL conjcantor (inicio+segmento*2, segmento, indice+1)
|
||||
END SUB
|
||||
|
||||
CALL cantor
|
||||
CALL conjcantor (0, ancho, 1)
|
||||
FOR i = 0 TO alto-1
|
||||
FOR j = 0 TO ancho-1
|
||||
PRINT intervalo$(i, j);
|
||||
NEXT j
|
||||
PRINT
|
||||
NEXT i
|
||||
END
|
||||
Loading…
Add table
Add a link
Reference in a new issue