Data update
This commit is contained in:
parent
35bcdeebf8
commit
74c69a0df6
2427 changed files with 31826 additions and 3468 deletions
21
Task/Van-Eck-sequence/BASIC256/van-eck-sequence.basic
Normal file
21
Task/Van-Eck-sequence/BASIC256/van-eck-sequence.basic
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
limite = 1001
|
||||
dim a(limite) fill 0
|
||||
|
||||
for n = 0 to limite-1
|
||||
for m = n-1 to 0 step -1
|
||||
if a[m] = a[n] then
|
||||
a[n+1] = n-m
|
||||
exit for
|
||||
end if
|
||||
next m
|
||||
next n
|
||||
|
||||
print "Secuencia de Van Eck:" & Chr(10)
|
||||
print "Primeros 10 terminos: ";
|
||||
for i = 0 to 9
|
||||
print a[i]; " ";
|
||||
next i
|
||||
print chr(10) & "Terminos 991 al 1000: ";
|
||||
for i = 990 to 999
|
||||
print a[i]; " ";
|
||||
next i
|
||||
Loading…
Add table
Add a link
Reference in a new issue