Odpowiedź:
program Fibonacci;
const
n = 10;
var
i: Integer;
tablica: array[1..n] of Integer;
begin
tablica[1] := 1;
tablica[2] := 1;
for i := 3 to n do
tablica[i] := tablica[i-1] + tablica[i-2];
for i := 1 to n do
writeln(tablica[i]);
end.
" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2025 KUDO.TIPS - All rights reserved.
Odpowiedź:
program Fibonacci;
const
n = 10;
var
i: Integer;
tablica: array[1..n] of Integer;
begin
tablica[1] := 1;
tablica[2] := 1;
for i := 3 to n do
tablica[i] := tablica[i-1] + tablica[i-2];
for i := 1 to n do
writeln(tablica[i]);
end.