Вычисление чисел Фибоначчи (паскаль) А[1]=1 А[2]=1 А[3]=2 А[4]=3 А[5]=5 А[6]=8
Answers & Comments
34003750202
Program Fib; var a:array [0..100] of integer; i,n:integer; begin a[1]:=1; a[2]:=1; for i:=3 to 100 do begin a[i]:=a[i-1]+a[i-2]; Write('a[',i,'] = ',a[i],' '); end; end.
Answers & Comments
var a:array [0..100] of integer;
i,n:integer;
begin
a[1]:=1;
a[2]:=1;
for i:=3 to 100 do
begin
a[i]:=a[i-1]+a[i-2];
Write('a[',i,'] = ',a[i],' ');
end;
end.