Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
23
Task/Van-Eck-sequence/ALGOL-M/van-eck-sequence.alg
Normal file
23
Task/Van-Eck-sequence/ALGOL-M/van-eck-sequence.alg
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
begin
|
||||
integer array eck[1:1000];
|
||||
integer i, j;
|
||||
|
||||
for i := 1 step 1 until 1000 do
|
||||
eck[i] := 0;
|
||||
|
||||
for i := 1 step 1 until 999 do
|
||||
begin
|
||||
j := i - 1;
|
||||
while j > 0 and eck[i] <> eck[j] do
|
||||
j := j - 1;
|
||||
if j <> 0 then
|
||||
eck[i+1] := i - j;
|
||||
end;
|
||||
|
||||
for i := 1 step 1 until 10 do
|
||||
writeon(eck[i]);
|
||||
write("");
|
||||
for i := 991 step 1 until 1000 do
|
||||
writeon(eck[i]);
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue