SlideShare a Scribd company logo
Flowcharts
Mukesh N.Tekwani
IsmailYusuf College of
Arts, Science and Commerce,
Jogeshwari (East),
Mumbai
tekwani@email.com
Presented at the One DayWorkshop Organized by K.P.B. Hinduja College
of Commerce, University of Mumbai on the Semester-wise splitT.Y.B.Com
and S.Y.B.Com Computer papers on
July 20, 2013
What is a Flowchart?
 What is a flowchart?
◦ Graphical or pictorial representation of an
algorithm or problem solving process
 Flow?
◦ Indicates the flow of logic, or sequence of
steps.
◦ There is a ‘before’ step and an ‘after’ step
◦ Flow control is needed because programs are
not linear or top-to-down
Mukesh N.Tekwani20 July 2013 2
Why flowchart is useful?
 A picture is worth a thousand words
 Help in understanding complicated logic
 Language-independent and so easy to write
program in various languages
 Good tool for documentation
◦ Verbose syntax of certain languages is difficult to
understand; flowchart eliminates the need to know
syntax to understand the logic
Mukesh N.Tekwani20 July 2013 3
What can a Flowchart Represent?
 Sequential statements – assignment,
calculations, input & output
 Branching or Selection Statements – if-then,
if-then-else: using Decision Symbol
 Looping Statements – for, while loops
 Switch-Case statement (successive decision
symbols)
Mukesh N.Tekwani20 July 2013 4
Symbols used in Flowcharts
Mukesh N.Tekwani20 July 2013 5
Guidelines in Drawing a Flowchart
 Logical sequence
 Standard symbols
 Direction of flow  top-to-down
◦ To jump to a step further down, go from right
◦ To jump to a step above the current step, go
from left
Mukesh N.Tekwani20 July 2013 6
Guidelines in Drawing a Flowchart
 Only one flow line should enter a decision
symbol
 More than one flow line may leave a symbol
 Only one flow line used with Stop symbol
 Use connector symbol to breakup a
complex flowchart
 A flowchart must end with the Stop
statement
Mukesh N.Tekwani20 July 2013 7
Flowchart of ‘while’ loop
Mukesh N.Tekwani20 July 2013 8
Flowchart of ‘for’ loop
Mukesh N.Tekwani20 July 2013 9
Flowchart of ‘if’ statement
Mukesh N.Tekwani20 July 2013 10
Flowchart of ‘if-else’ statement
Mukesh N.Tekwani20 July 2013 11
Flowchart of ‘switch-case’ statement
Mukesh N.Tekwani20 July 2013 12
Sum of Two Numbers
Mukesh N.Tekwani20 July 2013 13
START
INPUT X, Y
Is X > Y ?
BIG = X
Yes
PRINT BIG
BIG = Y
STOP
No
L
a
r
g
e
r
O
f
T
w
o
N
u
m
b
e
r
s
Mukesh N.Tekwani20 July 2013 14
F
a
c
t
o
r
i
a
l
o
f
a
N
u
m
b
e
r
Yes
START
Read N
F = 1
M = 1
Is
M = N?
F = F * M
Print F
No
M = M + 1
STOP
Assume:
N  no. whose factorial is
required
Mukesh N.Tekwani20 July 2013 15
MultiplicationTableofanumberinputby
user
Mukesh N.Tekwani20 July 2013 16
Flowchart – Find the Largest of Three Numbers
Mukesh N.Tekwani20 July 2013 17
Limitations of Flowcharts
 Complex – for lengthy algorithms, flowchart
can be very large  difficult to follow
 Time-consuming – drawing complex
flowcharts can be very time-consuming
 Modification – difficult to modify; redraw
entire flowchart
 Update – program update is easier; not so
for flowcharts  redraw flowchart !
Mukesh N.Tekwani20 July 2013 18
Exercise
 Design an algorithm and the corresponding
flowchart for finding the sum of the numbers
2, 4, 6, 8, …, n
 Draw a flowchart to read 100 numbers and
then display the sum
 Draw a flowchart to display all odd numbers
between 0 and 1000
 Draw a flowchart to find the sum of first 10
natural numbers and then display the sum
Mukesh N.Tekwani20 July 2013 19
Suggestions
 Algorithm  Flowchart  Program
 Use programs in C language to develop
questions on Algorithms and Flowcharts
Mukesh N.Tekwani20 July 2013 20
THANK YOU
STOP
Mukesh N.Tekwani20 July 2013 21

More Related Content

What's hot

Pseudocode
PseudocodePseudocode
Pseudocode
Harsha Madushanka
 
Trigger in DBMS
Trigger in DBMSTrigger in DBMS
Trigger in DBMS
A. S. M. Shafi
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
Anshumali Singh
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
Sachin Goyani
 
structured programming
structured programmingstructured programming
structured programming
Ahmad54321
 
Python dictionary
Python   dictionaryPython   dictionary
Python dictionary
Mohammed Sikander
 
ppt of flowchart
ppt of flowchartppt of flowchart
ppt of flowchart
140120109032
 
Database queries
Database queriesDatabase queries
Database queries
IIUM
 
10. switch case
10. switch case10. switch case
10. switch case
Way2itech
 
Data structure ppt
Data structure pptData structure ppt
Data structure ppt
Prof. Dr. K. Adisesha
 
Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm designNahid Hasan
 
Activity diagram
Activity diagramActivity diagram
Activity diagram
LOKENDRA PRAJAPATI
 
Flow chart
Flow chartFlow chart
Lock based protocols
Lock based protocolsLock based protocols
Lock based protocols
ChethanMp7
 
basic structure of SQL FINAL.pptx
basic structure of SQL FINAL.pptxbasic structure of SQL FINAL.pptx
basic structure of SQL FINAL.pptx
Anusha sivakumar
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and Flowcharts
Deva Singh
 
Algorithm
AlgorithmAlgorithm
Algorithm
IHTISHAM UL HAQ
 
Algorithm and pseudo codes
Algorithm and pseudo codesAlgorithm and pseudo codes
Algorithm and pseudo codeshermiraguilar
 

What's hot (20)

Pseudocode
PseudocodePseudocode
Pseudocode
 
Trigger in DBMS
Trigger in DBMSTrigger in DBMS
Trigger in DBMS
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
structured programming
structured programmingstructured programming
structured programming
 
Python dictionary
Python   dictionaryPython   dictionary
Python dictionary
 
ppt of flowchart
ppt of flowchartppt of flowchart
ppt of flowchart
 
Database queries
Database queriesDatabase queries
Database queries
 
10. switch case
10. switch case10. switch case
10. switch case
 
Data structure ppt
Data structure pptData structure ppt
Data structure ppt
 
Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm design
 
Activity diagram
Activity diagramActivity diagram
Activity diagram
 
Flow chart
Flow chartFlow chart
Flow chart
 
Set operators
Set  operatorsSet  operators
Set operators
 
Lock based protocols
Lock based protocolsLock based protocols
Lock based protocols
 
basic structure of SQL FINAL.pptx
basic structure of SQL FINAL.pptxbasic structure of SQL FINAL.pptx
basic structure of SQL FINAL.pptx
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and Flowcharts
 
Algorithm
AlgorithmAlgorithm
Algorithm
 
Algorithm and pseudo codes
Algorithm and pseudo codesAlgorithm and pseudo codes
Algorithm and pseudo codes
 

More from Mukesh Tekwani

Computer Science Made Easy - Youtube Channel
Computer Science Made Easy - Youtube ChannelComputer Science Made Easy - Youtube Channel
Computer Science Made Easy - Youtube Channel
Mukesh Tekwani
 
The Elphinstonian 1988-College Building Centenary Number (2).pdf
The Elphinstonian 1988-College Building Centenary Number (2).pdfThe Elphinstonian 1988-College Building Centenary Number (2).pdf
The Elphinstonian 1988-College Building Centenary Number (2).pdf
Mukesh Tekwani
 
Circular motion
Circular motionCircular motion
Circular motion
Mukesh Tekwani
 
Gravitation
GravitationGravitation
Gravitation
Mukesh Tekwani
 
ISCE-Class 12-Question Bank - Electrostatics - Physics
ISCE-Class 12-Question Bank - Electrostatics  -  PhysicsISCE-Class 12-Question Bank - Electrostatics  -  Physics
ISCE-Class 12-Question Bank - Electrostatics - Physics
Mukesh Tekwani
 
Hexadecimal to binary conversion
Hexadecimal to binary conversion Hexadecimal to binary conversion
Hexadecimal to binary conversion
Mukesh Tekwani
 
Hexadecimal to decimal conversion
Hexadecimal to decimal conversion Hexadecimal to decimal conversion
Hexadecimal to decimal conversion
Mukesh Tekwani
 
Hexadecimal to octal conversion
Hexadecimal to octal conversionHexadecimal to octal conversion
Hexadecimal to octal conversion
Mukesh Tekwani
 
Gray code to binary conversion
Gray code to binary conversion Gray code to binary conversion
Gray code to binary conversion
Mukesh Tekwani
 
What is Gray Code?
What is Gray Code? What is Gray Code?
What is Gray Code?
Mukesh Tekwani
 
Decimal to Binary conversion
Decimal to Binary conversionDecimal to Binary conversion
Decimal to Binary conversion
Mukesh Tekwani
 
Video Lectures for IGCSE Physics 2020-21
Video Lectures for IGCSE Physics 2020-21Video Lectures for IGCSE Physics 2020-21
Video Lectures for IGCSE Physics 2020-21
Mukesh Tekwani
 
Refraction and dispersion of light through a prism
Refraction and dispersion of light through a prismRefraction and dispersion of light through a prism
Refraction and dispersion of light through a prism
Mukesh Tekwani
 
Refraction of light at a plane surface
Refraction of light at a plane surfaceRefraction of light at a plane surface
Refraction of light at a plane surface
Mukesh Tekwani
 
Spherical mirrors
Spherical mirrorsSpherical mirrors
Spherical mirrors
Mukesh Tekwani
 
Atom, origin of spectra Bohr's theory of hydrogen atom
Atom, origin of spectra Bohr's theory of hydrogen atomAtom, origin of spectra Bohr's theory of hydrogen atom
Atom, origin of spectra Bohr's theory of hydrogen atom
Mukesh Tekwani
 
Refraction of light at spherical surfaces of lenses
Refraction of light at spherical surfaces of lensesRefraction of light at spherical surfaces of lenses
Refraction of light at spherical surfaces of lenses
Mukesh Tekwani
 
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGEISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
Mukesh Tekwani
 
Cyber Laws
Cyber LawsCyber Laws
Cyber Laws
Mukesh Tekwani
 
XML
XMLXML

More from Mukesh Tekwani (20)

Computer Science Made Easy - Youtube Channel
Computer Science Made Easy - Youtube ChannelComputer Science Made Easy - Youtube Channel
Computer Science Made Easy - Youtube Channel
 
The Elphinstonian 1988-College Building Centenary Number (2).pdf
The Elphinstonian 1988-College Building Centenary Number (2).pdfThe Elphinstonian 1988-College Building Centenary Number (2).pdf
The Elphinstonian 1988-College Building Centenary Number (2).pdf
 
Circular motion
Circular motionCircular motion
Circular motion
 
Gravitation
GravitationGravitation
Gravitation
 
ISCE-Class 12-Question Bank - Electrostatics - Physics
ISCE-Class 12-Question Bank - Electrostatics  -  PhysicsISCE-Class 12-Question Bank - Electrostatics  -  Physics
ISCE-Class 12-Question Bank - Electrostatics - Physics
 
Hexadecimal to binary conversion
Hexadecimal to binary conversion Hexadecimal to binary conversion
Hexadecimal to binary conversion
 
Hexadecimal to decimal conversion
Hexadecimal to decimal conversion Hexadecimal to decimal conversion
Hexadecimal to decimal conversion
 
Hexadecimal to octal conversion
Hexadecimal to octal conversionHexadecimal to octal conversion
Hexadecimal to octal conversion
 
Gray code to binary conversion
Gray code to binary conversion Gray code to binary conversion
Gray code to binary conversion
 
What is Gray Code?
What is Gray Code? What is Gray Code?
What is Gray Code?
 
Decimal to Binary conversion
Decimal to Binary conversionDecimal to Binary conversion
Decimal to Binary conversion
 
Video Lectures for IGCSE Physics 2020-21
Video Lectures for IGCSE Physics 2020-21Video Lectures for IGCSE Physics 2020-21
Video Lectures for IGCSE Physics 2020-21
 
Refraction and dispersion of light through a prism
Refraction and dispersion of light through a prismRefraction and dispersion of light through a prism
Refraction and dispersion of light through a prism
 
Refraction of light at a plane surface
Refraction of light at a plane surfaceRefraction of light at a plane surface
Refraction of light at a plane surface
 
Spherical mirrors
Spherical mirrorsSpherical mirrors
Spherical mirrors
 
Atom, origin of spectra Bohr's theory of hydrogen atom
Atom, origin of spectra Bohr's theory of hydrogen atomAtom, origin of spectra Bohr's theory of hydrogen atom
Atom, origin of spectra Bohr's theory of hydrogen atom
 
Refraction of light at spherical surfaces of lenses
Refraction of light at spherical surfaces of lensesRefraction of light at spherical surfaces of lenses
Refraction of light at spherical surfaces of lenses
 
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGEISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
 
Cyber Laws
Cyber LawsCyber Laws
Cyber Laws
 
XML
XMLXML
XML
 

Recently uploaded

Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
Mohammed Sikander
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
Kartik Tiwari
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 

Recently uploaded (20)

Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 

Flowcharts

  • 1. Flowcharts Mukesh N.Tekwani IsmailYusuf College of Arts, Science and Commerce, Jogeshwari (East), Mumbai tekwani@email.com Presented at the One DayWorkshop Organized by K.P.B. Hinduja College of Commerce, University of Mumbai on the Semester-wise splitT.Y.B.Com and S.Y.B.Com Computer papers on July 20, 2013
  • 2. What is a Flowchart?  What is a flowchart? ◦ Graphical or pictorial representation of an algorithm or problem solving process  Flow? ◦ Indicates the flow of logic, or sequence of steps. ◦ There is a ‘before’ step and an ‘after’ step ◦ Flow control is needed because programs are not linear or top-to-down Mukesh N.Tekwani20 July 2013 2
  • 3. Why flowchart is useful?  A picture is worth a thousand words  Help in understanding complicated logic  Language-independent and so easy to write program in various languages  Good tool for documentation ◦ Verbose syntax of certain languages is difficult to understand; flowchart eliminates the need to know syntax to understand the logic Mukesh N.Tekwani20 July 2013 3
  • 4. What can a Flowchart Represent?  Sequential statements – assignment, calculations, input & output  Branching or Selection Statements – if-then, if-then-else: using Decision Symbol  Looping Statements – for, while loops  Switch-Case statement (successive decision symbols) Mukesh N.Tekwani20 July 2013 4
  • 5. Symbols used in Flowcharts Mukesh N.Tekwani20 July 2013 5
  • 6. Guidelines in Drawing a Flowchart  Logical sequence  Standard symbols  Direction of flow  top-to-down ◦ To jump to a step further down, go from right ◦ To jump to a step above the current step, go from left Mukesh N.Tekwani20 July 2013 6
  • 7. Guidelines in Drawing a Flowchart  Only one flow line should enter a decision symbol  More than one flow line may leave a symbol  Only one flow line used with Stop symbol  Use connector symbol to breakup a complex flowchart  A flowchart must end with the Stop statement Mukesh N.Tekwani20 July 2013 7
  • 8. Flowchart of ‘while’ loop Mukesh N.Tekwani20 July 2013 8
  • 9. Flowchart of ‘for’ loop Mukesh N.Tekwani20 July 2013 9
  • 10. Flowchart of ‘if’ statement Mukesh N.Tekwani20 July 2013 10
  • 11. Flowchart of ‘if-else’ statement Mukesh N.Tekwani20 July 2013 11
  • 12. Flowchart of ‘switch-case’ statement Mukesh N.Tekwani20 July 2013 12
  • 13. Sum of Two Numbers Mukesh N.Tekwani20 July 2013 13
  • 14. START INPUT X, Y Is X > Y ? BIG = X Yes PRINT BIG BIG = Y STOP No L a r g e r O f T w o N u m b e r s Mukesh N.Tekwani20 July 2013 14
  • 15. F a c t o r i a l o f a N u m b e r Yes START Read N F = 1 M = 1 Is M = N? F = F * M Print F No M = M + 1 STOP Assume: N  no. whose factorial is required Mukesh N.Tekwani20 July 2013 15
  • 17. Flowchart – Find the Largest of Three Numbers Mukesh N.Tekwani20 July 2013 17
  • 18. Limitations of Flowcharts  Complex – for lengthy algorithms, flowchart can be very large  difficult to follow  Time-consuming – drawing complex flowcharts can be very time-consuming  Modification – difficult to modify; redraw entire flowchart  Update – program update is easier; not so for flowcharts  redraw flowchart ! Mukesh N.Tekwani20 July 2013 18
  • 19. Exercise  Design an algorithm and the corresponding flowchart for finding the sum of the numbers 2, 4, 6, 8, …, n  Draw a flowchart to read 100 numbers and then display the sum  Draw a flowchart to display all odd numbers between 0 and 1000  Draw a flowchart to find the sum of first 10 natural numbers and then display the sum Mukesh N.Tekwani20 July 2013 19
  • 20. Suggestions  Algorithm  Flowchart  Program  Use programs in C language to develop questions on Algorithms and Flowcharts Mukesh N.Tekwani20 July 2013 20