SlideShare a Scribd company logo
2
Most read
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
Ad

Recommended

USE OF PRINT IN PYTHON PART 2
USE OF PRINT IN PYTHON PART 2
vikram mahendra
 
C Programming: Control Structure
C Programming: Control Structure
Sokngim Sa
 
C++ Functions
C++ Functions
sathish sak
 
C language
C language
Priya698357
 
Data Types and Variables In C Programming
Data Types and Variables In C Programming
Kamal Acharya
 
Python programming : Standard Input and Output
Python programming : Standard Input and Output
Emertxe Information Technologies Pvt Ltd
 
Operators and expressions in c language
Operators and expressions in c language
tanmaymodi4
 
Control statements in c
Control statements in c
Sathish Narayanan
 
c++ programming Unit 2 basic structure of a c++ program
c++ programming Unit 2 basic structure of a c++ program
AAKASH KUMAR
 
Managing I/O in c++
Managing I/O in c++
Pranali Chaudhari
 
IF Statement
IF Statement
Yunis20
 
Input and Output In C Language
Input and Output In C Language
Adnan Khan
 
C standard library functions
C standard library functions
Vaishnavee Sharma
 
C presentation book
C presentation book
krunal1210
 
Basic python programs
Basic python programs
RaginiJain21
 
Python Flow Control
Python Flow Control
Kamal Acharya
 
Conversion from infix to prefix using stack
Conversion from infix to prefix using stack
Haqnawaz Ch
 
C functions
C functions
University of Potsdam
 
Expression and Operartor In C Programming
Expression and Operartor In C Programming
Kamal Acharya
 
Python programming : List and tuples
Python programming : List and tuples
Emertxe Information Technologies Pvt Ltd
 
CONDITIONAL STATEMENT IN C LANGUAGE
CONDITIONAL STATEMENT IN C LANGUAGE
Ideal Eyes Business College
 
Presentation on function
Presentation on function
Abu Zaman
 
Input and output in C++
Input and output in C++
Nilesh Dalvi
 
File management
File management
lalithambiga kamaraj
 
The role of the parser and Error recovery strategies ppt in compiler design
The role of the parser and Error recovery strategies ppt in compiler design
Sadia Akter
 
Operator overloading
Operator overloading
Pranali Chaudhari
 
Complexity of Algorithm
Complexity of Algorithm
Muhammad Muzammal
 
Database Management Lab -SQL Queries
Database Management Lab -SQL Queries
shamim hossain
 
Abstraction in c++ and Real Life Example of Abstraction in C++
Abstraction in c++ and Real Life Example of Abstraction in C++
Hitesh Kumar
 
HTML Interview Questions | Basic Html Interview Questions
HTML Interview Questions | Basic Html Interview Questions
Hitesh Kumar
 

More Related Content

What's hot (20)

c++ programming Unit 2 basic structure of a c++ program
c++ programming Unit 2 basic structure of a c++ program
AAKASH KUMAR
 
Managing I/O in c++
Managing I/O in c++
Pranali Chaudhari
 
IF Statement
IF Statement
Yunis20
 
Input and Output In C Language
Input and Output In C Language
Adnan Khan
 
C standard library functions
C standard library functions
Vaishnavee Sharma
 
C presentation book
C presentation book
krunal1210
 
Basic python programs
Basic python programs
RaginiJain21
 
Python Flow Control
Python Flow Control
Kamal Acharya
 
Conversion from infix to prefix using stack
Conversion from infix to prefix using stack
Haqnawaz Ch
 
C functions
C functions
University of Potsdam
 
Expression and Operartor In C Programming
Expression and Operartor In C Programming
Kamal Acharya
 
Python programming : List and tuples
Python programming : List and tuples
Emertxe Information Technologies Pvt Ltd
 
CONDITIONAL STATEMENT IN C LANGUAGE
CONDITIONAL STATEMENT IN C LANGUAGE
Ideal Eyes Business College
 
Presentation on function
Presentation on function
Abu Zaman
 
Input and output in C++
Input and output in C++
Nilesh Dalvi
 
File management
File management
lalithambiga kamaraj
 
The role of the parser and Error recovery strategies ppt in compiler design
The role of the parser and Error recovery strategies ppt in compiler design
Sadia Akter
 
Operator overloading
Operator overloading
Pranali Chaudhari
 
Complexity of Algorithm
Complexity of Algorithm
Muhammad Muzammal
 
Database Management Lab -SQL Queries
Database Management Lab -SQL Queries
shamim hossain
 
c++ programming Unit 2 basic structure of a c++ program
c++ programming Unit 2 basic structure of a c++ program
AAKASH KUMAR
 
IF Statement
IF Statement
Yunis20
 
Input and Output In C Language
Input and Output In C Language
Adnan Khan
 
C standard library functions
C standard library functions
Vaishnavee Sharma
 
C presentation book
C presentation book
krunal1210
 
Basic python programs
Basic python programs
RaginiJain21
 
Conversion from infix to prefix using stack
Conversion from infix to prefix using stack
Haqnawaz Ch
 
Expression and Operartor In C Programming
Expression and Operartor In C Programming
Kamal Acharya
 
Presentation on function
Presentation on function
Abu Zaman
 
Input and output in C++
Input and output in C++
Nilesh Dalvi
 
The role of the parser and Error recovery strategies ppt in compiler design
The role of the parser and Error recovery strategies ppt in compiler design
Sadia Akter
 
Database Management Lab -SQL Queries
Database Management Lab -SQL Queries
shamim hossain
 

More from Hitesh Kumar (20)

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

Recently uploaded (20)

YSPH VMOC Special Report - Measles Outbreak Southwest US 6-14-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 6-14-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
How to Manage Different Customer Addresses in Odoo 18 Accounting
How to Manage Different Customer Addresses in Odoo 18 Accounting
Celine George
 
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT Kharagpur Quiz Club
 
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Rajdeep Bavaliya
 
ENGLISH_Q1_W1 PowerPoint grade 3 quarter 1 week 1
ENGLISH_Q1_W1 PowerPoint grade 3 quarter 1 week 1
jutaydeonne
 
ECONOMICS, DISASTER MANAGEMENT, ROAD SAFETY - STUDY MATERIAL [10TH]
ECONOMICS, DISASTER MANAGEMENT, ROAD SAFETY - STUDY MATERIAL [10TH]
SHERAZ AHMAD LONE
 
Battle of Bookworms 2025 - U25 Literature Quiz by Pragya
Battle of Bookworms 2025 - U25 Literature Quiz by Pragya
Pragya - UEM Kolkata Quiz Club
 
Communicable Diseases and National Health Programs – Unit 9 | B.Sc Nursing 5t...
Communicable Diseases and National Health Programs – Unit 9 | B.Sc Nursing 5t...
RAKESH SAJJAN
 
This is why students from these 44 institutions have not received National Se...
This is why students from these 44 institutions have not received National Se...
Kweku Zurek
 
Values Education 10 Quarter 1 Module .pptx
Values Education 10 Quarter 1 Module .pptx
JBPafin
 
Non-Communicable Diseases and National Health Programs – Unit 10 | B.Sc Nursi...
Non-Communicable Diseases and National Health Programs – Unit 10 | B.Sc Nursi...
RAKESH SAJJAN
 
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
parmarjuli1412
 
“THE BEST CLASS IN SCHOOL”. _
“THE BEST CLASS IN SCHOOL”. _
Colégio Santa Teresinha
 
ROLE PLAY: FIRST AID -CPR & RECOVERY POSITION.pptx
ROLE PLAY: FIRST AID -CPR & RECOVERY POSITION.pptx
Belicia R.S
 
Hurricane Helene Application Documents Checklists
Hurricane Helene Application Documents Checklists
Mebane Rash
 
English 3 Quarter 1_LEwithLAS_Week 1.pdf
English 3 Quarter 1_LEwithLAS_Week 1.pdf
DeAsisAlyanajaneH
 
LDM Recording Presents Yogi Goddess by LDMMIA
LDM Recording Presents Yogi Goddess by LDMMIA
LDM & Mia eStudios
 
Health Care Planning and Organization of Health Care at Various Levels – Unit...
Health Care Planning and Organization of Health Care at Various Levels – Unit...
RAKESH SAJJAN
 
K12 Tableau User Group virtual event June 18, 2025
K12 Tableau User Group virtual event June 18, 2025
dogden2
 
Q1_ENGLISH_PPT_WEEK 1 power point grade 3 Quarter 1 week 1
Q1_ENGLISH_PPT_WEEK 1 power point grade 3 Quarter 1 week 1
jutaydeonne
 
How to Manage Different Customer Addresses in Odoo 18 Accounting
How to Manage Different Customer Addresses in Odoo 18 Accounting
Celine George
 
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT Kharagpur Quiz Club
 
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Rajdeep Bavaliya
 
ENGLISH_Q1_W1 PowerPoint grade 3 quarter 1 week 1
ENGLISH_Q1_W1 PowerPoint grade 3 quarter 1 week 1
jutaydeonne
 
ECONOMICS, DISASTER MANAGEMENT, ROAD SAFETY - STUDY MATERIAL [10TH]
ECONOMICS, DISASTER MANAGEMENT, ROAD SAFETY - STUDY MATERIAL [10TH]
SHERAZ AHMAD LONE
 
Battle of Bookworms 2025 - U25 Literature Quiz by Pragya
Battle of Bookworms 2025 - U25 Literature Quiz by Pragya
Pragya - UEM Kolkata Quiz Club
 
Communicable Diseases and National Health Programs – Unit 9 | B.Sc Nursing 5t...
Communicable Diseases and National Health Programs – Unit 9 | B.Sc Nursing 5t...
RAKESH SAJJAN
 
This is why students from these 44 institutions have not received National Se...
This is why students from these 44 institutions have not received National Se...
Kweku Zurek
 
Values Education 10 Quarter 1 Module .pptx
Values Education 10 Quarter 1 Module .pptx
JBPafin
 
Non-Communicable Diseases and National Health Programs – Unit 10 | B.Sc Nursi...
Non-Communicable Diseases and National Health Programs – Unit 10 | B.Sc Nursi...
RAKESH SAJJAN
 
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
parmarjuli1412
 
ROLE PLAY: FIRST AID -CPR & RECOVERY POSITION.pptx
ROLE PLAY: FIRST AID -CPR & RECOVERY POSITION.pptx
Belicia R.S
 
Hurricane Helene Application Documents Checklists
Hurricane Helene Application Documents Checklists
Mebane Rash
 
English 3 Quarter 1_LEwithLAS_Week 1.pdf
English 3 Quarter 1_LEwithLAS_Week 1.pdf
DeAsisAlyanajaneH
 
LDM Recording Presents Yogi Goddess by LDMMIA
LDM Recording Presents Yogi Goddess by LDMMIA
LDM & Mia eStudios
 
Health Care Planning and Organization of Health Care at Various Levels – Unit...
Health Care Planning and Organization of Health Care at Various Levels – Unit...
RAKESH SAJJAN
 
K12 Tableau User Group virtual event June 18, 2025
K12 Tableau User Group virtual event June 18, 2025
dogden2
 
Q1_ENGLISH_PPT_WEEK 1 power point grade 3 Quarter 1 week 1
Q1_ENGLISH_PPT_WEEK 1 power point grade 3 Quarter 1 week 1
jutaydeonne
 
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