Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
52
Task/Periodic-table/Craft-Basic/periodic-table.basic
Normal file
52
Task/Periodic-table/Craft-Basic/periodic-table.basic
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
dim a[1, 2, 5, 13, 57, 72, 89, 104]
|
||||
dim b[-1, 15, 25, 35, 72, 21, 58, 7]
|
||||
|
||||
title "Periodic Table Search"
|
||||
resize 0, 0, 220, 140
|
||||
center
|
||||
|
||||
formid 1
|
||||
formtext "Search"
|
||||
buttonform 55, 40, 100, 20
|
||||
|
||||
formid 2
|
||||
formtext ""
|
||||
staticform 1, 1, 220, 20
|
||||
|
||||
do
|
||||
|
||||
if forms = 1 then
|
||||
|
||||
gosub searchtable
|
||||
|
||||
endif
|
||||
|
||||
button k, 27
|
||||
|
||||
wait
|
||||
|
||||
loop k <> 1
|
||||
|
||||
end
|
||||
|
||||
sub searchtable
|
||||
|
||||
input "Atomic number", e
|
||||
|
||||
let i = 8
|
||||
|
||||
do
|
||||
|
||||
let i = i - 1
|
||||
|
||||
loop a[i] > e
|
||||
|
||||
let m = e + b[i]
|
||||
let r = int(m / 18) + 1
|
||||
let c = int(m % 18) + 1
|
||||
|
||||
formid 2
|
||||
formtext "Period: ", r, comma, " Group: ", c
|
||||
updateform
|
||||
|
||||
return
|
||||
Loading…
Add table
Add a link
Reference in a new issue