Program:
// Program By http://solutionscpp.blogspot.com// Author Mansoor Ahmed
// GMail ID: secguy000@gmail.com
#include <iostream>
using namespace std;
int main()
{
int n=0 , first = 1, second = 1, next=0 ;
cout << "Enter total number of terms: ";
cin >> n;
cout << "Fibonacci Series is: " << first << " " << second << " ";
for (int i = 1; i <= n-2; ++i)
{
next = first+ second;
cout << next << " ";
first = second;
second = next;
}
return 0;
}
I found nice article in your blog.thank you for useful info
ReplyDelete.
ReplyDeletenice article for beginners.thank you.
c++ tutorial
java tutorial