05-02-2010, 02:03 PM
05-02-2010, 08:38 PM
i hope this will help u...
Code:
#include<iostream>
using namespace std;
int main()
{
int x=0,temp=0,tem=0,count=1,size;
cout<<"ENTER THE SIZE OF FABONACCI SERIES : ";
cin>>size;
cout<<endl;
while (count<=size)
{
if (count==2)
temp=1;
if(count%2!=0)
{
temp=x;
}
if (count%2==0)
{
tem=x;
}
x=tem+temp;
cout<<" "<<x;
count++;
}
cout<<endl;
return 0;
}06-02-2010, 02:35 PM
nice solution
23-02-2010, 10:22 AM
That's a different logic, that I came across for Fibonacci series in C++ programming language.
The logic is better and much faster than the normal ones, I mean the computational way.
I am obliged to have come across such a site to be among such programming experts. 
The logic is better and much faster than the normal ones, I mean the computational way.
I am obliged to have come across such a site to be among such programming experts. 
25-03-2010, 07:40 AM
Its a good solution, But not like normal one. go to the C++ basic and know more relevant to that. Its good for you.