Data update
This commit is contained in:
parent
35bcdeebf8
commit
74c69a0df6
2427 changed files with 31826 additions and 3468 deletions
22
Task/Van-Eck-sequence/Yabasic/van-eck-sequence.basic
Normal file
22
Task/Van-Eck-sequence/Yabasic/van-eck-sequence.basic
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
limite = 1001
|
||||
dim a(limite)
|
||||
|
||||
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
|
||||
break
|
||||
fi
|
||||
next m
|
||||
next n
|
||||
|
||||
print "Secuencia de Van Eck: \n"
|
||||
print "Primeros 10 terminos: ";
|
||||
for i = 0 to 9
|
||||
print a(i), " ";
|
||||
next i
|
||||
print "\nTerminos 991 al 1000: ";
|
||||
for i = 990 to 999
|
||||
print a(i), " ";
|
||||
next i
|
||||
print
|
||||
Loading…
Add table
Add a link
Reference in a new issue