Kamis, 19 Maret 2015
Bilanan Fibonacci
PROGRAM FIBONACCI;
uses crt;
var
n:integer;
i:integer;
deret:array[1..100] of longint;
begin
clrscr;
write('Masukan jumlah deret :');
readln(n);
writeln;
for i := 0 to n-1 do
begin
if (i = 0) or (i = 1) then
begin
deret[i]:=1;
write(deret[i],' ');
end
else
begin
deret[i]:=deret[i-1]+deret[i-2];
write(deret[i], ' ');
end;
end;
readln;
end.
Langganan:
Posting Komentar (Atom)
What is the best sports toto? - Sporting 100
BalasHapusThe best sports toto are the following: · What is the best betting site to bet on football · Which online sportsbooks offer 토토 사이트 홍보 the best odds and the best payouts? · What