RSS
Facebook
Twitter

Thursday, July 08, 2010

PRograM C 'Deret BilaNgan FibOnacci'

/*Nama = Yulyanti ; NIM = 0910117260006*/

#include
#include

int fibo(int n,int z)
{
int i,u=1,y=1;

for(i=1;i<=n-3;i++) { u=y; y=z; z=u+y; printf(" %d ",z); } } main() { int z,n,u=1,y=1; clrscr(); printf("\t\t---Deret Bilangan Fibonaci---\n\n"); printf("Input n deret bilangan fibonaci yang ingin Anda tampilkan="); scanf("%d",&n); z=u+y; printf("=> %d %d %d",u,y,z);
fibo(n,z);
getch();
}

0 komentar: