Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,40 @@
REM Periodic table
DIM A(7)
DIM B(7)
REM Arrays A, B.
DATA 1, 2, 5, 13, 57, 72, 89, 104
DATA -1, 15, 25, 35, 72, 21, 58, 7
REM Example elements (atomic numbers).
DATA 1, 2, 29, 42, 57, 58, 72, 89, 90, 103
GOSUB SetAB:
FOR J = 0 TO 9
READ AtomicNum
GOSUB ShowRowAndColumn:
NEXT J
END
SetAB:
FOR I = 0 TO 7
READ A(I)
NEXT I
FOR I = 0 TO 7
READ B(I)
NEXT I
RETURN
ShowRowAndColumn:
I = 7
WHILE A(I) > AtomicNum
I = I - 1
WEND
M = AtomicNum + B(I)
R = M / 18
R = R + 1
C = M MOD 18
C = C + 1
PRINT AtomicNum;
PRINT " ->";
PRINT R;
PRINT C
RETURN