Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,35 @@
|
|||
function gcd(a as uinteger, b as uinteger) as uinteger
|
||||
if b = 0 then return a
|
||||
return gcd( b, a mod b )
|
||||
end function
|
||||
|
||||
dim as uinteger i, j, k, Y(1 to 100)
|
||||
|
||||
Y(1) = 1 : Y(2) = 2: Y(3) = 3
|
||||
|
||||
for i = 4 to 100
|
||||
k = 3
|
||||
print i
|
||||
do
|
||||
k += 1
|
||||
if gcd( k, Y(i-2) ) = 1 orelse gcd( k, Y(i-1) ) > 1 then continue do
|
||||
for j = 1 to i-1
|
||||
if Y(j)=k then continue do
|
||||
next j
|
||||
Y(i) = k
|
||||
exit do
|
||||
loop
|
||||
next i
|
||||
|
||||
for i = 1 to 30
|
||||
print str(Y(i))+" ";
|
||||
next i
|
||||
print
|
||||
screen 13
|
||||
for i = 1 to 100
|
||||
pset (i, 200-Y(i)), 31
|
||||
next i
|
||||
|
||||
while inkey=""
|
||||
wend
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue