Fibonacci Series: 1 ,1 ,2 ,3 ,5 ,8 ,13 ,21 ,34.
Often, especially in modern usage, the sequence is extended by one more initial term.
Fibonacci Series: 0 ,1 ,1 ,2 ,3 ,5 ,8 ,13 ,21 ,34.
Nth Term of Fibonacci Series in C++
#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 << "Fibonacci 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;
}
Nth Term of Fibonacci Series Output
Similar to the Nth Term of Fibonacci Series
- Write a Program to Print Fibonacci Series in C++
- Fibonacci Series in C++ Using Function
- Reverse a Given Number Using the While Loop
- Find the Number Is Armstrong or Not Using While Loop
- Calculate the Sum of Natural Numbers Using the While Loop
- Print Multiplication Table Using for Loop
- Find the GCD of Two Numbers Using Loop
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