Home > Algoritma, Pascal > Program Mencari Suku Bilangan Fibonacci Menggunakan Pascal

Program Mencari Suku Bilangan Fibonacci Menggunakan Pascal

Program pascal berikut untuk mencari suku bilangan Fibonacci

program cari_suku_fibonacci;
uses wincrt;
var x:array[1..50] of integer;
    i,n:integer;
begin
    x[1]:=1; x[2]:=1;
    write('Anda mencari suku ke : ');readln(n);
    write(x[1],' ');
    write(x[2],' ');
    for i:=3 to n do
    begin
	x[i]:=x[i-1]+x[i-2];
	write(x[i],' ');
    end;
    writeln;
    writeln('Suku ke ',i,' = ',x[i]);
    readln;
end.

Download


Baca Juga :

  1. Ghalank Peace
    May 25, 2010 at 10:12 pm

    ada g’ listing untuk membuat grafik lingkaran, ellips, rotasi dan skala menggunakan free pascal? klo ada tolong donk krm ke email sy soalnya sy sangt butuh…

    trima ksh…..

  2. February 22, 2012 at 10:50 am

    bagaimana cara mencari suku ke n

  3. February 22, 2012 at 11:48 am

    mhn krim ke email saya, cara mencari suku ke n, thanks berat ,……..

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: