SlideShare a Scribd company logo
Sitesbay.com
Fibonacci Series in C++
Fibonacci Series Program in C++
Hitesh Kumar
SITESBAY.COM
Sitesbay.com
Fibonacci Series in C++
Fibonacci series or Fibonacci sequence are the numbers in the following integer
sequence:
1 1 2 3 5 8 13 21 34 55 ....... Here we write Fibonacci series program in C++
Fibonacci Series Program in C++
#include<iostream>
#include<conio.h>
using namespace std;
void main()
{
int counter, n;
long last = 1, next = 0, sum;
cout << "Enter any Number :";
cin>>n;
while (next < n / 2)
{
cout << last << " ";
sum = next + last;
next = last;
last = sum;
}
getch();
}
Sitesbay.com
Output
Enter any Number :100
1
1
2
3
5
8
13
21
34
55
89
For more basic C++ Programs visit our website Sitesbay.com

More Related Content

What's hot (20)

DOCX
Diff between c and c++
VishrudhMamidala
 
PPTX
Different types of Linked list.
JAYANTA OJHA
 
PDF
Singly linked list
Amar Jukuntla
 
PPT
SEARCHING AND SORTING ALGORITHMS
Gokul Hari
 
PPTX
queue & its applications
somendra kumar
 
PPTX
Bucket sort
Hemant Chetwani
 
PPTX
Infix to postfix conversion
Then Murugeshwari
 
PPTX
Prefix, Infix and Post-fix Notations
Afaq Mansoor Khan
 
PPTX
Data structure by Digvijay
Digvijay Singh Karakoti
 
PPTX
Quick sort
Jehat Hassan
 
PPTX
Dfs presentation
Alizay Khan
 
PPSX
Data Structure (Queue)
Adam Mukharil Bachtiar
 
PPT
finding Min and max element from given array using divide & conquer
Swati Kulkarni Jaipurkar
 
PPTX
Ppt bubble sort
prabhakar jalasutram
 
PPTX
For Loops and Nesting in Python
primeteacher32
 
PDF
Array data structure
maamir farooq
 
PPTX
Arrays in Data Structure and Algorithm
KristinaBorooah
 
PPTX
Queues
Ashim Lamichhane
 
PDF
What is Stack, Its Operations, Queue, Circular Queue, Priority Queue
Balwant Gorad
 
Diff between c and c++
VishrudhMamidala
 
Different types of Linked list.
JAYANTA OJHA
 
Singly linked list
Amar Jukuntla
 
SEARCHING AND SORTING ALGORITHMS
Gokul Hari
 
queue & its applications
somendra kumar
 
Bucket sort
Hemant Chetwani
 
Infix to postfix conversion
Then Murugeshwari
 
Prefix, Infix and Post-fix Notations
Afaq Mansoor Khan
 
Data structure by Digvijay
Digvijay Singh Karakoti
 
Quick sort
Jehat Hassan
 
Dfs presentation
Alizay Khan
 
Data Structure (Queue)
Adam Mukharil Bachtiar
 
finding Min and max element from given array using divide & conquer
Swati Kulkarni Jaipurkar
 
Ppt bubble sort
prabhakar jalasutram
 
For Loops and Nesting in Python
primeteacher32
 
Array data structure
maamir farooq
 
Arrays in Data Structure and Algorithm
KristinaBorooah
 
What is Stack, Its Operations, Queue, Circular Queue, Priority Queue
Balwant Gorad
 

More from Hitesh Kumar (20)

DOCX
Abstraction in c++ and Real Life Example of Abstraction in C++
Hitesh Kumar
 
PDF
HTML Interview Questions | Basic Html Interview Questions
Hitesh Kumar
 
PDF
CSS Interview Questions for Fresher and Experience
Hitesh Kumar
 
PDF
Factorial Program in C
Hitesh Kumar
 
PDF
Prime number program in C
Hitesh Kumar
 
PDF
Top JSON Interview Questions for Freshers
Hitesh Kumar
 
PDF
Queue in C, Queue Real Life of Example
Hitesh Kumar
 
PDF
Fibonacci series c++
Hitesh Kumar
 
PPTX
Super keyword in java
Hitesh Kumar
 
DOCX
Interface in java
Hitesh Kumar
 
DOCX
Encapsulation in C++
Hitesh Kumar
 
DOCX
Abstract class in java
Hitesh Kumar
 
PPTX
Super keyword in java
Hitesh Kumar
 
PPTX
Final keyword in java
Hitesh Kumar
 
PPTX
Constructor in java
Hitesh Kumar
 
PPTX
Super keyword in java
Hitesh Kumar
 
PPTX
Ternary operator
Hitesh Kumar
 
PPT
File handling in C++
Hitesh Kumar
 
PPTX
Main method in java
Hitesh Kumar
 
PPTX
This keyword in java
Hitesh Kumar
 
Abstraction in c++ and Real Life Example of Abstraction in C++
Hitesh Kumar
 
HTML Interview Questions | Basic Html Interview Questions
Hitesh Kumar
 
CSS Interview Questions for Fresher and Experience
Hitesh Kumar
 
Factorial Program in C
Hitesh Kumar
 
Prime number program in C
Hitesh Kumar
 
Top JSON Interview Questions for Freshers
Hitesh Kumar
 
Queue in C, Queue Real Life of Example
Hitesh Kumar
 
Fibonacci series c++
Hitesh Kumar
 
Super keyword in java
Hitesh Kumar
 
Interface in java
Hitesh Kumar
 
Encapsulation in C++
Hitesh Kumar
 
Abstract class in java
Hitesh Kumar
 
Super keyword in java
Hitesh Kumar
 
Final keyword in java
Hitesh Kumar
 
Constructor in java
Hitesh Kumar
 
Super keyword in java
Hitesh Kumar
 
Ternary operator
Hitesh Kumar
 
File handling in C++
Hitesh Kumar
 
Main method in java
Hitesh Kumar
 
This keyword in java
Hitesh Kumar
 
Ad

Recently uploaded (20)

PPTX
Optimizing Cancer Screening With MCED Technologies: From Science to Practical...
i3 Health
 
PPTX
LEGAL ASPECTS OF PSYCHIATRUC NURSING.pptx
PoojaSen20
 
PPTX
Nutrition Month 2025 TARP.pptx presentation
FairyLouHernandezMej
 
PPTX
Latest Features in Odoo 18 - Odoo slides
Celine George
 
PPTX
Constitutional Design Civics Class 9.pptx
bikesh692
 
PPTX
ROLE OF ANTIOXIDANT IN EYE HEALTH MANAGEMENT.pptx
Subham Panja
 
PDF
Module 1: Determinants of Health [Tutorial Slides]
JonathanHallett4
 
PPTX
Optimizing Cancer Screening With MCED Technologies: From Science to Practical...
i3 Health
 
PDF
Ziehl-Neelsen Stain: Principle, Procedu.
PRASHANT YADAV
 
PPT
digestive system for Pharm d I year HAP
rekhapositivity
 
PPTX
CLEFT LIP AND PALATE: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
PPTX
Accounting Skills Paper-I, Preparation of Vouchers
Dr. Sushil Bansode
 
PDF
Right to Information.pdf by Sapna Maurya XI D
Directorate of Education Delhi
 
PPTX
Room booking management - Meeting Room In Odoo 17
Celine George
 
PPTX
national medicinal plants board mpharm.pptx
SHAHEEN SHABBIR
 
PPTX
Presentation: Climate Citizenship Digital Education
Karl Donert
 
PPTX
Modern analytical techniques used to characterize organic compounds. Birbhum ...
AyanHossain
 
PPTX
Mrs Mhondiwa Introduction to Algebra class
sabinaschimanga
 
PPTX
Views on Education of Indian Thinkers Mahatma Gandhi.pptx
ShrutiMahanta1
 
PPTX
HIRSCHSPRUNG'S DISEASE(MEGACOLON): NURSING MANAGMENT.pptx
PRADEEP ABOTHU
 
Optimizing Cancer Screening With MCED Technologies: From Science to Practical...
i3 Health
 
LEGAL ASPECTS OF PSYCHIATRUC NURSING.pptx
PoojaSen20
 
Nutrition Month 2025 TARP.pptx presentation
FairyLouHernandezMej
 
Latest Features in Odoo 18 - Odoo slides
Celine George
 
Constitutional Design Civics Class 9.pptx
bikesh692
 
ROLE OF ANTIOXIDANT IN EYE HEALTH MANAGEMENT.pptx
Subham Panja
 
Module 1: Determinants of Health [Tutorial Slides]
JonathanHallett4
 
Optimizing Cancer Screening With MCED Technologies: From Science to Practical...
i3 Health
 
Ziehl-Neelsen Stain: Principle, Procedu.
PRASHANT YADAV
 
digestive system for Pharm d I year HAP
rekhapositivity
 
CLEFT LIP AND PALATE: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
Accounting Skills Paper-I, Preparation of Vouchers
Dr. Sushil Bansode
 
Right to Information.pdf by Sapna Maurya XI D
Directorate of Education Delhi
 
Room booking management - Meeting Room In Odoo 17
Celine George
 
national medicinal plants board mpharm.pptx
SHAHEEN SHABBIR
 
Presentation: Climate Citizenship Digital Education
Karl Donert
 
Modern analytical techniques used to characterize organic compounds. Birbhum ...
AyanHossain
 
Mrs Mhondiwa Introduction to Algebra class
sabinaschimanga
 
Views on Education of Indian Thinkers Mahatma Gandhi.pptx
ShrutiMahanta1
 
HIRSCHSPRUNG'S DISEASE(MEGACOLON): NURSING MANAGMENT.pptx
PRADEEP ABOTHU
 
Ad

Fibonacci Series Program in C++

  • 1. Sitesbay.com Fibonacci Series in C++ Fibonacci Series Program in C++ Hitesh Kumar SITESBAY.COM
  • 2. Sitesbay.com Fibonacci Series in C++ Fibonacci series or Fibonacci sequence are the numbers in the following integer sequence: 1 1 2 3 5 8 13 21 34 55 ....... Here we write Fibonacci series program in C++ Fibonacci Series Program in C++ #include<iostream> #include<conio.h> using namespace std; void main() { int counter, n; long last = 1, next = 0, sum; cout << "Enter any Number :"; cin>>n; while (next < n / 2) { cout << last << " "; sum = next + last; next = last; last = sum; } getch(); }
  • 3. Sitesbay.com Output Enter any Number :100 1 1 2 3 5 8 13 21 34 55 89 For more basic C++ Programs visit our website Sitesbay.com