#include<iostream>

using namespace std;

int main()

{

int range, first = 0, second = 1, fibonicci;

cout << "Enter the Range for Terms of Fibonacci Sequence " << endl;

cin >> range;

cout << "Fibonicci Series upto " << range << " Terms "<<endl<< endl;

for ( int c = 0 ; c < range ; c++ )

{

if ( c <= 1 )

fibonicci = c;

else

{

fibonicci = first + second;

first = second;

second = fibonicci;

}

cout << fibonicci <<" ";

}

return 0;

}

using namespace std;

int main()

{

int range, first = 0, second = 1, fibonicci;

cout << "Enter the Range for Terms of Fibonacci Sequence " << endl;

cin >> range;

cout << "Fibonicci Series upto " << range << " Terms "<<endl<< endl;

for ( int c = 0 ; c < range ; c++ )

{

if ( c <= 1 )

fibonicci = c;

else

{

fibonicci = first + second;

first = second;

second = fibonicci;

}

cout << fibonicci <<" ";

}

return 0;

}

Good Work Abhi

ReplyDeleteGreat Article android based projects

DeleteJava Training in Chennai

Project Center in Chennai

Java Training in Chennai

projects for cse

The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

great

ReplyDelete