Menghitung Fibonanci dengan Bahasa C

on

Berikut ini saya akan share bagaimana menghitung Bilangan Fibonanci dengan bahasa c:
berikut screenshootnya:



Dan berikut Scriptnya:

#include<stdio.h>
#include<conio.h>

int fib(int n)
{
int f;
if (n==0)f=0;
else if(n==1)f=1;
else f=fib(n-2)+fib(n-1);
return f;

}

void main()
{
int n;

printf(“masukkan n: “);
scanf(“%d”,&n);

printf(“bilangan fibonacci dari %d = %d”,n,fib(n));

getch();
}

Semoga bermanfaat… !!!

4 Comments Add yours

  1. Juegos Gratis mengatakan:

    He descubierto este forum de chiripa y ahora se va a el bookmarker.
    Maravillossa descubrimiento. Felicitaciones.

  2. Juegos Gratis mengatakan:

     Me chifla la sitio web. ¿Serias Tan Amable De aconsejarme muchisimos cheats de
    esrilo y diseño?. Felicidades Y Gracias.

  3. missionchretienne.org mengatakan:

    I have read so many posts about the blogger lovers but this paragraph is genuinely a nice article,
    keep it up.

  4. google mengatakan:

    It’s appropriate time to make some plans for the
    future and it’s time to be happy. I’ve read this post and if I could I wish to suggest you some interesting things or
    tips. Perhaps you could write next articles referring to
    this article. I desire to read more things about
    it!

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s