[C] Fibonacci Number Iterative
(Jul 11, 2008)
There is a program for Fibonacci Number normal and abnormal
#include "stdio.h"
#include "conio.h"
int main(void)
{
int a,b,c,i,input;
a=0;
b=1;
c=1;
printf("Masukkan banyaknya deret fibonacci= ");
scanf("%d",&input);
printf("Deret Fibonacci= ");
for (i=1;i<=input;i++)
{
printf("%d ",c);
c=a+b;
a=b;
b=c;
}
getch();
return (0);
}
Download the code here
Posted in Label: C language, Download, Source Code Diposting oleh Alexander Rahardjo
0 komentar:
Post a Comment