Syntaksnya :
#include
//
#include
#define MAX 10
int fibo[MAX];
int main()
{
int i;
fibo[1]=1;
fibo[2]=1;
for
(i=3;i<=MAX;i++)
fibo[i]=fibo[i-2]+fibo[i-1];
printf("%
bilangan fibonanci pertama adalah : \n",MAX);
for
(i=1;i
printf("%d-",fibo[i]);
getche();
}
0 komentar:
Posting Komentar