Data update
This commit is contained in:
parent
35bcdeebf8
commit
74c69a0df6
2427 changed files with 31826 additions and 3468 deletions
23
Task/Van-Eck-sequence/Chipmunk-Basic/van-eck-sequence.basic
Normal file
23
Task/Van-Eck-sequence/Chipmunk-Basic/van-eck-sequence.basic
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
100 cls
|
||||
110 limite = 1000
|
||||
120 dim a(limite)
|
||||
130 '
|
||||
140 for n = 0 to limite-1
|
||||
150 for m = n-1 to 0 step -1
|
||||
160 if a(m) = a(n) then
|
||||
170 a(n+1) = n-m
|
||||
180 exit for
|
||||
190 endif
|
||||
200 next m
|
||||
210 next n
|
||||
220 '
|
||||
230 print "Secuencia de Van Eck:";chr$(10)
|
||||
240 print "Primeros 10 terminos: ";
|
||||
250 for i = 0 to 9
|
||||
260 print a(i);
|
||||
270 next i
|
||||
280 print chr$(10);"Terminos 991 al 1000: ";
|
||||
290 for i = 990 to 999
|
||||
300 print a(i);
|
||||
310 next i
|
||||
320 end
|
||||
Loading…
Add table
Add a link
Reference in a new issue