March 04, 2013


#include <iostream.h>
#include <conio.h>
main(void)
{
int a, b, c, x, n, i;
cout<<"Bilangan1 ";
cin>>a;
cout<<"Bilangan2 ";
cin>>b;
cout<<"Panjangderet ";
cin>>c;

cout<<endl<<"Deret fibonacci "<<a<<" , "<<b<<" , ";

for(i=0;i<=c-3;i++)
{n=a+b;
a=b;
b=n;

cout<<n<<" , ";}

getch();
}

Don't  forget your comment, thanks...

Leave a Reply

Subscribe to Posts | Subscribe to Comments

Popular Post

- Copyright © welcome to Hakim's blog. -Metrominimalist- Powered by Blogger - Designed by Johanes Djogan -