google search

Popular Posts


Welcome to BCA Notes

>>>>>>>>>>>>>>>>

Visitors

Search This Blog

Blogger templates

Visitor Map


Thursday, 26 June 2014

c++ Program for generating Faboncii series

Source Code:-

#include<iostream.h>
#include<conio.h>
int main()
{

long int a=0,b=1,c=0,j;
cout<<"Enter the terms upto which you want to have faboncii series: ";
cin>>j;
cout<<a<<"\n";
//cout<<b<<"\n";

for (int i=0;i<=j;i++)
{
a=b;
b=c;
c=a+b;
cout<<c<<"\n";
}
getch();
return 0;
}

For any questions, query ,suggestion & output :-
Contact Me:-

rishabhbaid96@gmail.com

0 comments:

Post a Comment