SlideShare a Scribd company logo
1 of 2
/* Program Name: C++ program to display a fibonacci series of 15 terms */
#include <iostream.h>
#include <conio.h>
void main()
{
int first, second, fiboseries, n;
first = 0;
second = 1;
cout << "Fibonacci Series nn";
cout << first << "n" << second;
for(n=1;n<=13;n++)
{
fiboseries = first + second;
cout << "n" << fiboseries;
first = second;
second = fiboseries;
}
}
Output
-------
Flowchart
----------
Start
Declare variables first, second,
fiboseries, n
Initialise first = 0, second = 1, n = 13
Fibonacci Series n n
n =1
n < = 13?
yes
fiboseries = first + second
first = second
n++
Print fiboseries
Stop
No

More Related Content

What's hot

What's hot (20)

Algoritmos ensambladores
Algoritmos ensambladoresAlgoritmos ensambladores
Algoritmos ensambladores
 
C Programming Language Part 9
C Programming Language Part 9C Programming Language Part 9
C Programming Language Part 9
 
Prime number program in c
Prime number program in cPrime number program in c
Prime number program in c
 
Vcs15
Vcs15Vcs15
Vcs15
 
Week3
Week3Week3
Week3
 
C Programming Language Part 11
C Programming Language Part 11C Programming Language Part 11
C Programming Language Part 11
 
Catastrophic Cancellation
Catastrophic CancellationCatastrophic Cancellation
Catastrophic Cancellation
 
C Programming Language Part 8
C Programming Language Part 8C Programming Language Part 8
C Programming Language Part 8
 
C Programming Language Part 7
C Programming Language Part 7C Programming Language Part 7
C Programming Language Part 7
 
C Programming Language Step by Step Part 2
C Programming Language Step by Step Part 2C Programming Language Step by Step Part 2
C Programming Language Step by Step Part 2
 
c plus plus programsSlide
c plus plus programsSlidec plus plus programsSlide
c plus plus programsSlide
 
print even or odd number in c
print even or odd number in cprint even or odd number in c
print even or odd number in c
 
C programming
C programmingC programming
C programming
 
Function and class templates
Function and class templatesFunction and class templates
Function and class templates
 
First c program
First c programFirst c program
First c program
 
rtrtrNew text document
rtrtrNew text documentrtrtrNew text document
rtrtrNew text document
 
CS50 Lecture4
CS50 Lecture4CS50 Lecture4
CS50 Lecture4
 
Working with IDE
Working with IDEWorking with IDE
Working with IDE
 
C programs pbq final
C programs pbq finalC programs pbq final
C programs pbq final
 
C++ TUTORIAL 2
C++ TUTORIAL 2C++ TUTORIAL 2
C++ TUTORIAL 2
 

More from Aditi Bhushan

Chapter 15 [Bhagvad Geeta]
Chapter 15 [Bhagvad Geeta]Chapter 15 [Bhagvad Geeta]
Chapter 15 [Bhagvad Geeta]Aditi Bhushan
 
COMPUTER SCIENCE CLASS 11
COMPUTER SCIENCE CLASS 11COMPUTER SCIENCE CLASS 11
COMPUTER SCIENCE CLASS 11Aditi Bhushan
 
Basics of python programming
Basics of python programmingBasics of python programming
Basics of python programmingAditi Bhushan
 
Basics of Information Technology
Basics of Information TechnologyBasics of Information Technology
Basics of Information TechnologyAditi Bhushan
 
Calculation of Area of Circle and Rectangle
Calculation of Area of Circle and RectangleCalculation of Area of Circle and Rectangle
Calculation of Area of Circle and RectangleAditi Bhushan
 
Calculation of first 100 numbers using do-until loop
Calculation of first 100 numbers using do-until loopCalculation of first 100 numbers using do-until loop
Calculation of first 100 numbers using do-until loopAditi Bhushan
 
HSc Information Technology Practical List
HSc Information Technology Practical List HSc Information Technology Practical List
HSc Information Technology Practical List Aditi Bhushan
 
HSc Computer Science Practical Slip for Class 12
HSc Computer Science Practical Slip for Class 12HSc Computer Science Practical Slip for Class 12
HSc Computer Science Practical Slip for Class 12Aditi Bhushan
 
Visual Basic Source Codes for Class 11 HSc Paper 1 Practicals
Visual Basic Source Codes for Class 11 HSc Paper 1 PracticalsVisual Basic Source Codes for Class 11 HSc Paper 1 Practicals
Visual Basic Source Codes for Class 11 HSc Paper 1 PracticalsAditi Bhushan
 
Introduction to Visual basic 6.0
Introduction to Visual basic 6.0Introduction to Visual basic 6.0
Introduction to Visual basic 6.0Aditi Bhushan
 
Functional hardware of pc
Functional hardware of pcFunctional hardware of pc
Functional hardware of pcAditi Bhushan
 
Language and its Function
Language and its FunctionLanguage and its Function
Language and its FunctionAditi Bhushan
 
Teacher autonomy : a tool to create learner autonomy
Teacher autonomy : a tool to create learner autonomyTeacher autonomy : a tool to create learner autonomy
Teacher autonomy : a tool to create learner autonomyAditi Bhushan
 
Importance of body language at workplace
Importance of body language at workplaceImportance of body language at workplace
Importance of body language at workplaceAditi Bhushan
 
Role of indian govt. portal e pg pathshala
Role of indian govt. portal e pg pathshalaRole of indian govt. portal e pg pathshala
Role of indian govt. portal e pg pathshalaAditi Bhushan
 
conservation of solar energy
conservation of solar energyconservation of solar energy
conservation of solar energyAditi Bhushan
 

More from Aditi Bhushan (20)

Binary Search
Binary SearchBinary Search
Binary Search
 
Chapter 15 [Bhagvad Geeta]
Chapter 15 [Bhagvad Geeta]Chapter 15 [Bhagvad Geeta]
Chapter 15 [Bhagvad Geeta]
 
COMPUTER SCIENCE CLASS 11
COMPUTER SCIENCE CLASS 11COMPUTER SCIENCE CLASS 11
COMPUTER SCIENCE CLASS 11
 
HTML and CSS codes
HTML and CSS codesHTML and CSS codes
HTML and CSS codes
 
HTML codes 1
HTML codes 1HTML codes 1
HTML codes 1
 
Basics of python programming
Basics of python programmingBasics of python programming
Basics of python programming
 
Basics of Information Technology
Basics of Information TechnologyBasics of Information Technology
Basics of Information Technology
 
Calculation of Area of Circle and Rectangle
Calculation of Area of Circle and RectangleCalculation of Area of Circle and Rectangle
Calculation of Area of Circle and Rectangle
 
Calculation of first 100 numbers using do-until loop
Calculation of first 100 numbers using do-until loopCalculation of first 100 numbers using do-until loop
Calculation of first 100 numbers using do-until loop
 
HSc Information Technology Practical List
HSc Information Technology Practical List HSc Information Technology Practical List
HSc Information Technology Practical List
 
HSc Computer Science Practical Slip for Class 12
HSc Computer Science Practical Slip for Class 12HSc Computer Science Practical Slip for Class 12
HSc Computer Science Practical Slip for Class 12
 
Cpp source code1
Cpp source code1Cpp source code1
Cpp source code1
 
Visual Basic Source Codes for Class 11 HSc Paper 1 Practicals
Visual Basic Source Codes for Class 11 HSc Paper 1 PracticalsVisual Basic Source Codes for Class 11 HSc Paper 1 Practicals
Visual Basic Source Codes for Class 11 HSc Paper 1 Practicals
 
Introduction to Visual basic 6.0
Introduction to Visual basic 6.0Introduction to Visual basic 6.0
Introduction to Visual basic 6.0
 
Functional hardware of pc
Functional hardware of pcFunctional hardware of pc
Functional hardware of pc
 
Language and its Function
Language and its FunctionLanguage and its Function
Language and its Function
 
Teacher autonomy : a tool to create learner autonomy
Teacher autonomy : a tool to create learner autonomyTeacher autonomy : a tool to create learner autonomy
Teacher autonomy : a tool to create learner autonomy
 
Importance of body language at workplace
Importance of body language at workplaceImportance of body language at workplace
Importance of body language at workplace
 
Role of indian govt. portal e pg pathshala
Role of indian govt. portal e pg pathshalaRole of indian govt. portal e pg pathshala
Role of indian govt. portal e pg pathshala
 
conservation of solar energy
conservation of solar energyconservation of solar energy
conservation of solar energy
 

Recently uploaded

Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 

Recently uploaded (20)

Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 

Fibonacci Series Program in C++

  • 1. /* Program Name: C++ program to display a fibonacci series of 15 terms */ #include <iostream.h> #include <conio.h> void main() { int first, second, fiboseries, n; first = 0; second = 1; cout << "Fibonacci Series nn"; cout << first << "n" << second; for(n=1;n<=13;n++) { fiboseries = first + second; cout << "n" << fiboseries; first = second; second = fiboseries; } } Output ------- Flowchart ----------
  • 2. Start Declare variables first, second, fiboseries, n Initialise first = 0, second = 1, n = 13 Fibonacci Series n n n =1 n < = 13? yes fiboseries = first + second first = second n++ Print fiboseries Stop No