Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
32
Task/Periodic-table/Minimal-BASIC/periodic-table.basic
Normal file
32
Task/Periodic-table/Minimal-BASIC/periodic-table.basic
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
10 REM Periodic table
|
||||
20 GOSUB 200
|
||||
30 FOR J = 0 TO 9
|
||||
40 READ N
|
||||
50 GOSUB 400
|
||||
60 NEXT J
|
||||
70 END
|
||||
190 REM Set arrays A, B.
|
||||
200 DIM A(7), B(7)
|
||||
210 FOR I = 0 TO 7
|
||||
220 READ A(I)
|
||||
230 NEXT I
|
||||
240 FOR I = 0 TO 7
|
||||
250 READ B(I)
|
||||
260 NEXT I
|
||||
270 RETURN
|
||||
390 REM Show row and column for element
|
||||
400 LET I = 7
|
||||
410 IF A(I) <= N THEN 440
|
||||
420 LET I = I-1
|
||||
430 GOTO 410
|
||||
440 LET M = N+B(I)
|
||||
450 LET R = INT(M/18)+1
|
||||
460 LET C = M-INT(M/18)*18+1
|
||||
470 PRINT N; "->"; R; C
|
||||
480 RETURN
|
||||
990 REM Data.
|
||||
1000 REM Arrays A, B.
|
||||
1010 DATA 1, 2, 5, 13, 57, 72, 89, 104
|
||||
1020 DATA -1, 15, 25, 35, 72, 21, 58, 7
|
||||
1030 REM Example elements (atomic numbers).
|
||||
1040 DATA 1, 2, 29, 42, 57, 58, 72, 89, 90, 103
|
||||
Loading…
Add table
Add a link
Reference in a new issue