cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
help reqd for fibonacci series program
help reqd for fibonacci series program
Aug 21, 2014 at 3:21pm UTC
androbada525
(1)
#include <iostream>
void main()
{
int i;
int j=0,n;
cout<<"enter number of terms you want in Fibonacci series";
cin>>n;
for(i=0;i<=n;i++)
{
j=j+i;
cout << j << endl;
}
getch();
}
What should I add on to this program to get the fibonacci series?
Aug 21, 2014 at 6:03pm UTC
keskiverto
(10402)
Please, use the code tags and informative indentation:
http://www.cplusplus.com/articles/jEywvCM9/
You have to start by looking at how a term in the series is calculated.
What do you need in order to calculate the
n
th term?
Topic archived. No new replies allowed.