Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
32
Task/Periodic-table/QBasic/periodic-table.basic
Normal file
32
Task/Periodic-table/QBasic/periodic-table.basic
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
SUB MostarPos (N)
|
||||
DIM a(7)
|
||||
RESTORE a:
|
||||
FOR x = 0 TO 7: READ a(x): NEXT x
|
||||
DIM b(7)
|
||||
RESTORE b:
|
||||
FOR x = 0 TO 7: READ b(x): NEXT x
|
||||
|
||||
I = 7
|
||||
WHILE a(I) > N
|
||||
I = I - 1
|
||||
WEND
|
||||
M = N + b(I)
|
||||
R = (M \ 18) + 1
|
||||
C = (M MOD 18) + 1
|
||||
PRINT USING "Atomic number ### -> #_, ##"; N; R; C
|
||||
END SUB
|
||||
|
||||
DIM Element(0 TO 12)
|
||||
RESTORE elements
|
||||
elements:
|
||||
DATA 1, 2, 29, 42, 57, 58, 59, 71, 72, 89, 90, 103, 113
|
||||
FOR x = 0 TO 12: READ Element(x): NEXT x
|
||||
|
||||
FOR I = 0 TO UBOUND(Element)
|
||||
MostarPos (Element(I))
|
||||
NEXT I
|
||||
|
||||
a:
|
||||
DATA 1, 2, 5, 13, 57, 72, 89, 104
|
||||
b:
|
||||
DATA -1, 15, 25, 35, 72, 21, 58, 7
|
||||
Loading…
Add table
Add a link
Reference in a new issue