SlideShare a Scribd company logo
Algorithm and Flowchart
Dhanik Mahehswari
dhanikvikrant@gmail.com
Civil engineering department
QUEST Nawabshah
 In order to solve any problem by using computer, it is
very imperative to
 Detail the precise problem
 Itemizing the configuration
 The process of solving problem is known as “Problem
analysis”
Problem Solving Stages
 A problem solving process consists of eight stages as:
 Defining the problem
 Algorithm
 Flowchart
 Coding
 Input Preparation
 Compilation
 Debugging
 Testing
 This step has a great importance in obtaining the correct
solution of the problem
 The solution of the problem depends upon the description
and understanding the problem.
 This requires analysis of the problem to find the nature of
the problem analysis of the input data and planning of the
output result.
 This step achieves following goals:
Defining the Problem
 Problem description
 Determination of the objective
 Analysis of the input data
 Planning of output
 Series of procedural steps required to solve a given problem
is called an algorithm.
 The construction of the algorithm is the stage which requires
steps or operations which collectively solve 'a given problem.
 An algorithm usually is in ordinary English language and use
some mathematical symbols, if it is possible to solve a given
problem in more than one ways
 The choice of particular algorithm depends upon various
such as its reliability, accuracy and ease of modification.
Algorithm
 One of the most important factor in the choice of an
algorithm is the time requirement to execute it (after it in
high level language) with the help of computer.
 The algorithm which will least time when executed by a
computer is considered the best.
 Write an algorithm to print given roll number and name.
 Step 1: Enter Roll number
 Step 2: Enter Name
 Step 3: Print Roll number
 Step 4: Print name
 Step 5: Stop
EXAMPLE 01
 Write an algorithm to print the first ten natural numbers.
 Step-I: Select a counter A
 Step-2: Initialize A as zero
 Step-3: Add 1 to A
 Step-4: Print A
 Step-5: If A <10 then go to step-3
 Step-6: Stop
EXAMPLE 02
 Write an algorithm to print the greatest number from two
given numbers.
 Step-I: Enter two numbers as A and B
 Step-2: If A > B then Print A and go to step 4
 Step-3: Print B
 Step-4: Stop
EXAMPLE 03
 Write an algorithm to print a table of a given number
 Step-1: Select two counters as B and C
 Step-2: Initialize the counters B and C as zero
 Step-3: Enter a, number of table as A
 Step-4: Add 1 to B
 Step-5: Multiply A to B and assign the result to C
 Step-6: Print A; B and C
 Step-7: Check the value of B; If B<1O then go to step-4
 Step-8: Stop
EXAMPLE 04
 Write-an algorithm to print square and cubes from 1 to 5
 Step-1: Select the counter A, B and C
 Step-2: Initialize B and C as zero
 Step-3: Initialize A as 1
 Step-4: Calculate B as A*A
 Step-5: Calculate C as A*A*A
 Step-6: Print A, B, and C.
 Step-7: Add 1 to A
 Step-8: Check the value of A; if A < 5 then go to step-3
 Step-9: Stop
EXAMPLE 05
 A flowchart is a pictorial representation of the steps of a
involved in the procedure of solving any problem.
 The first formal flowchart was designed by John Von
Neumann‘
 A flowchart is drawn before the program in written to
ensure the instructions will be logically integrated.
 A flowchart is not a complete program but It is an aid to
programming.
FLOWCHART
 There are two types of flowchart, which are
 System Flowchart
 Program Flowchart
 A system flowchart shows the flow of data throughout a
data process as well as the flow into and out system. The
system analyst will use such a design and to explain a
data processing system.
 Program flowchart is a pictorial representation of the
method and sequence, to be followed for solving a
particular problem.
 There are several sets of the symbols, which are
standardized by American National Standard Institute
International Standard Organization (ISO) to draw the
flowchart.
 Most commonly used symbols are Oval, Parallelogram,
Rectangle, Diamond, Arrows, Connectors.
 Oval
 This ‘symbol' is used for beginning or end of a flowchart.
Therefore, it is also named as “TERMINAL”
Start/End
 PARALLELOGRAM:
 This symbol is used for transfer of data between Central
Processing Unit (CPU) output devices.
 In the simple words we can say this symbol is used to
represent and output operations.
 Therefore, it is also known as INPUT/OUTPUT box.
INPUT/
OUTPUT
 RECTANGLE:
 This symbol is used to represent any arithmetic operation
or transfer of data.
 This symbol is also known as PROCESS box.
PROCESS
 DIAMOND:
 This symbol is used to test the condition or to ask
question and on the their answers that decide a definite
path from a number of alternatives
 This symbols is also known as DECISION BOX.
 ARROWS:
 This symbol is used to show the direction of the flow
 In a flowchart every line must have an arrow to indicate
 CONNECTORS:
 Connectors are used to join the different parts of a
flowchart.
 The use of connectors gives neat shape to the flowchart.
there are two types of connector which are known as:
(a) On page connector
(b) Off page connector
 (a) On Page Connector
 On page Connector is represented by small circles.
 In a flowchart whenever complexity in branching arises,
this connectors used to connect one process with an
other place
 (b) Off Page Connector
 This symbol is used for off page Connector.
 In a complicated problem, flowchart may run into several
pages. The part of the flowchart on different pages is
connected with the help of Off Page Connector.
 Write a program to read a number from
keyboard, calculate the square of the
number and display it on the screen.
 1: Beginning of the program
 2: Read the number from the keyboard
 3: Calculate square of the Number
 4: Print the Square of the Number
 5: Stop
END
START
READ
Number
CALCULATE
(Number)2
PRINT
(Number)2
EXAMPLE 01
 Write a program to reads a number from
keyboard, checks; whether number is positive
or negative, if the number is positive it is
printed as it , If number is negative then
absolute value of the number is printed.
 1. Beginning of program.
 2. Read the number from the keyboard.
 3. If N >0, go to step 7
 4. Determine absolute value of N and assign
the resulting value to A, go
 5. Assigning the value of N to A
 6: Print the value of A
 7. End of program.
EXAMPLE 02 START
INPUT
N
PRINT
A
N = |N|
NO
IF
N ≥ 0
A = N
YES
B
START
B
 Draw flowchart to print given roll number and name.
 Draw flowchart to print the first ten natural numbers.
 Draw flowchart to print the greatest number from two
given numbers.
 Draw flowchart to print a table of a given number
 Draw flowchart to print square and cubes from 1 to 5
EXERCISE
 Draw flowchart to solve equation ax+b=0. Execute
flowchart using following data (i) a=3, b=6 (ii) a=0, b=52
 Draw flowchart to convert given temperature in Celsius
scale into Fahrenheit scale (i) 20oC (ii) 40oC (iii) 0oC
Flowchart and algorithm

More Related Content

What's hot

Problem solving methodology
Problem solving methodologyProblem solving methodology
Problem solving methodology
Prof. Dr. K. Adisesha
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
Rabin BK
 
Programming flowcharts for C Language
Programming flowcharts for C LanguageProgramming flowcharts for C Language
Programming flowcharts for C Language
Aryan Ajmer
 
Lec 2 algorithms efficiency complexity
Lec 2 algorithms efficiency  complexityLec 2 algorithms efficiency  complexity
Lec 2 algorithms efficiency complexity
Anaya Zafar
 
Introduction to Pseudocode
Introduction to PseudocodeIntroduction to Pseudocode
Introduction to PseudocodeDamian T. Gordon
 
Pseudocode
PseudocodePseudocode
Pseudocode
grahamwell
 
ppt of flowchart
ppt of flowchartppt of flowchart
ppt of flowchart
140120109032
 
SPL 2 | Algorithms, Pseudo-code, and Flowchart
SPL 2 | Algorithms, Pseudo-code, and FlowchartSPL 2 | Algorithms, Pseudo-code, and Flowchart
SPL 2 | Algorithms, Pseudo-code, and Flowchart
Mohammad Imam Hossain
 
Programming fundamentals lecture 1&2
Programming fundamentals lecture 1&2Programming fundamentals lecture 1&2
Programming fundamentals lecture 1&2Raja Hamid
 
Types of Programming Errors
Types of Programming ErrorsTypes of Programming Errors
Types of Programming Errors
Neha Sharma
 
Introduction to Flowchart
Introduction to FlowchartIntroduction to Flowchart
Introduction to Flowchart
ChristopherEsteban2
 
Lexical analysis - Compiler Design
Lexical analysis - Compiler DesignLexical analysis - Compiler Design
Lexical analysis - Compiler Design
Muhammed Afsal Villan
 
What is an algorithm?
What is an algorithm?What is an algorithm?
What is an algorithm?
Angela DeHart
 
Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm designNahid Hasan
 
Algorithm and Programming (Introduction of Algorithms)
Algorithm and Programming (Introduction of Algorithms)Algorithm and Programming (Introduction of Algorithms)
Algorithm and Programming (Introduction of Algorithms)
Adam Mukharil Bachtiar
 
Unit 1-problem solving with algorithm
Unit 1-problem solving with algorithmUnit 1-problem solving with algorithm
Unit 1-problem solving with algorithm
rajkumar1631010038
 
Chapter 2 Representation Of Algorithms 2
Chapter 2  Representation Of  Algorithms 2Chapter 2  Representation Of  Algorithms 2
Chapter 2 Representation Of Algorithms 2Li-Anne Serrano
 
PyCon 2015 (Py.15): Python Beginner's Tutorial
PyCon 2015 (Py.15): Python Beginner's TutorialPyCon 2015 (Py.15): Python Beginner's Tutorial
PyCon 2015 (Py.15): Python Beginner's Tutorial
Damian T. Gordon
 
Flow Chart Guide PPT
Flow Chart Guide PPTFlow Chart Guide PPT
Flow Chart Guide PPT
丹 丹
 
Algorithm Design & Implementation
Algorithm Design & ImplementationAlgorithm Design & Implementation
Algorithm Design & Implementation
Gaditek
 

What's hot (20)

Problem solving methodology
Problem solving methodologyProblem solving methodology
Problem solving methodology
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
Programming flowcharts for C Language
Programming flowcharts for C LanguageProgramming flowcharts for C Language
Programming flowcharts for C Language
 
Lec 2 algorithms efficiency complexity
Lec 2 algorithms efficiency  complexityLec 2 algorithms efficiency  complexity
Lec 2 algorithms efficiency complexity
 
Introduction to Pseudocode
Introduction to PseudocodeIntroduction to Pseudocode
Introduction to Pseudocode
 
Pseudocode
PseudocodePseudocode
Pseudocode
 
ppt of flowchart
ppt of flowchartppt of flowchart
ppt of flowchart
 
SPL 2 | Algorithms, Pseudo-code, and Flowchart
SPL 2 | Algorithms, Pseudo-code, and FlowchartSPL 2 | Algorithms, Pseudo-code, and Flowchart
SPL 2 | Algorithms, Pseudo-code, and Flowchart
 
Programming fundamentals lecture 1&2
Programming fundamentals lecture 1&2Programming fundamentals lecture 1&2
Programming fundamentals lecture 1&2
 
Types of Programming Errors
Types of Programming ErrorsTypes of Programming Errors
Types of Programming Errors
 
Introduction to Flowchart
Introduction to FlowchartIntroduction to Flowchart
Introduction to Flowchart
 
Lexical analysis - Compiler Design
Lexical analysis - Compiler DesignLexical analysis - Compiler Design
Lexical analysis - Compiler Design
 
What is an algorithm?
What is an algorithm?What is an algorithm?
What is an algorithm?
 
Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm design
 
Algorithm and Programming (Introduction of Algorithms)
Algorithm and Programming (Introduction of Algorithms)Algorithm and Programming (Introduction of Algorithms)
Algorithm and Programming (Introduction of Algorithms)
 
Unit 1-problem solving with algorithm
Unit 1-problem solving with algorithmUnit 1-problem solving with algorithm
Unit 1-problem solving with algorithm
 
Chapter 2 Representation Of Algorithms 2
Chapter 2  Representation Of  Algorithms 2Chapter 2  Representation Of  Algorithms 2
Chapter 2 Representation Of Algorithms 2
 
PyCon 2015 (Py.15): Python Beginner's Tutorial
PyCon 2015 (Py.15): Python Beginner's TutorialPyCon 2015 (Py.15): Python Beginner's Tutorial
PyCon 2015 (Py.15): Python Beginner's Tutorial
 
Flow Chart Guide PPT
Flow Chart Guide PPTFlow Chart Guide PPT
Flow Chart Guide PPT
 
Algorithm Design & Implementation
Algorithm Design & ImplementationAlgorithm Design & Implementation
Algorithm Design & Implementation
 

Similar to Flowchart and algorithm

AlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdfAlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdf
SusieMaestre1
 
Practical 01 (detailed)
Practical 01 (detailed)Practical 01 (detailed)
Practical 01 (detailed)
Muhammadalizardari
 
Logic Development and Algorithm.
Logic Development and Algorithm.Logic Development and Algorithm.
Logic Development and Algorithm.
NandiniSidana
 
algorithms and flow chart overview.pdf
algorithms and flow chart overview.pdfalgorithms and flow chart overview.pdf
algorithms and flow chart overview.pdf
AmanPratik11
 
Lecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.pptLecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.ppt
ReshuReshma8
 
Basic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and FlowchartsBasic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and Flowcharts
moazwinner
 
Flowcharting and Algorithm
Flowcharting and Algorithm Flowcharting and Algorithm
Flowcharting and Algorithm
Zeinna Belle Desamito
 
Flowcharts
FlowchartsFlowcharts
Flowcharts
parimala123
 
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHM
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHMCLASS VIII COMPUTERS FLOW CHART AND ALGORITHM
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHM
Rc Os
 
flowchart & algorithms
flowchart & algorithmsflowchart & algorithms
flowchart & algorithmsStudent
 
Algorithm for computational problematic sit
Algorithm for computational problematic sitAlgorithm for computational problematic sit
Algorithm for computational problematic sit
Saurabh846965
 
Fundamentals of Programming Chapter 3
Fundamentals of Programming Chapter 3Fundamentals of Programming Chapter 3
Fundamentals of Programming Chapter 3
Mohd Harris Ahmad Jaal
 
Lecture_01-Problem_Solving[1]||ProgrammingFundamental.ppt
Lecture_01-Problem_Solving[1]||ProgrammingFundamental.pptLecture_01-Problem_Solving[1]||ProgrammingFundamental.ppt
Lecture_01-Problem_Solving[1]||ProgrammingFundamental.ppt
cosc242101003
 
Psuedocode1, algorithm1, Flowchart1.pptx
Psuedocode1, algorithm1, Flowchart1.pptxPsuedocode1, algorithm1, Flowchart1.pptx
Psuedocode1, algorithm1, Flowchart1.pptx
MattFlordeliza1
 
Algorithm and flowchart.pptx
Algorithm and flowchart.pptxAlgorithm and flowchart.pptx
Algorithm and flowchart.pptx
MaheShiva
 
ALGORITHMS AND FLOWCHARTS
ALGORITHMS AND FLOWCHARTSALGORITHMS AND FLOWCHARTS
ALGORITHMS AND FLOWCHARTS
Kate Campbell
 
Introduction to computer science
Introduction to computer scienceIntroduction to computer science
Introduction to computer science
umardanjumamaiwada
 
lecture 5
 lecture 5 lecture 5
lecture 5
umardanjumamaiwada
 

Similar to Flowchart and algorithm (20)

AlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdfAlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdf
 
Practical 01 (detailed)
Practical 01 (detailed)Practical 01 (detailed)
Practical 01 (detailed)
 
Chap6
Chap6Chap6
Chap6
 
Cp module 2
Cp module 2Cp module 2
Cp module 2
 
Logic Development and Algorithm.
Logic Development and Algorithm.Logic Development and Algorithm.
Logic Development and Algorithm.
 
algorithms and flow chart overview.pdf
algorithms and flow chart overview.pdfalgorithms and flow chart overview.pdf
algorithms and flow chart overview.pdf
 
Lecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.pptLecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.ppt
 
Basic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and FlowchartsBasic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and Flowcharts
 
Flowcharting and Algorithm
Flowcharting and Algorithm Flowcharting and Algorithm
Flowcharting and Algorithm
 
Flowcharts
FlowchartsFlowcharts
Flowcharts
 
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHM
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHMCLASS VIII COMPUTERS FLOW CHART AND ALGORITHM
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHM
 
flowchart & algorithms
flowchart & algorithmsflowchart & algorithms
flowchart & algorithms
 
Algorithm for computational problematic sit
Algorithm for computational problematic sitAlgorithm for computational problematic sit
Algorithm for computational problematic sit
 
Fundamentals of Programming Chapter 3
Fundamentals of Programming Chapter 3Fundamentals of Programming Chapter 3
Fundamentals of Programming Chapter 3
 
Lecture_01-Problem_Solving[1]||ProgrammingFundamental.ppt
Lecture_01-Problem_Solving[1]||ProgrammingFundamental.pptLecture_01-Problem_Solving[1]||ProgrammingFundamental.ppt
Lecture_01-Problem_Solving[1]||ProgrammingFundamental.ppt
 
Psuedocode1, algorithm1, Flowchart1.pptx
Psuedocode1, algorithm1, Flowchart1.pptxPsuedocode1, algorithm1, Flowchart1.pptx
Psuedocode1, algorithm1, Flowchart1.pptx
 
Algorithm and flowchart.pptx
Algorithm and flowchart.pptxAlgorithm and flowchart.pptx
Algorithm and flowchart.pptx
 
ALGORITHMS AND FLOWCHARTS
ALGORITHMS AND FLOWCHARTSALGORITHMS AND FLOWCHARTS
ALGORITHMS AND FLOWCHARTS
 
Introduction to computer science
Introduction to computer scienceIntroduction to computer science
Introduction to computer science
 
lecture 5
 lecture 5 lecture 5
lecture 5
 

Recently uploaded

Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
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
 
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
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
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
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 

Recently uploaded (20)

Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
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...
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
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
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 

Flowchart and algorithm

  • 1. Algorithm and Flowchart Dhanik Mahehswari dhanikvikrant@gmail.com Civil engineering department QUEST Nawabshah
  • 2.  In order to solve any problem by using computer, it is very imperative to  Detail the precise problem  Itemizing the configuration  The process of solving problem is known as “Problem analysis” Problem Solving Stages
  • 3.  A problem solving process consists of eight stages as:  Defining the problem  Algorithm  Flowchart  Coding  Input Preparation  Compilation  Debugging  Testing
  • 4.  This step has a great importance in obtaining the correct solution of the problem  The solution of the problem depends upon the description and understanding the problem.  This requires analysis of the problem to find the nature of the problem analysis of the input data and planning of the output result.  This step achieves following goals: Defining the Problem
  • 5.  Problem description  Determination of the objective  Analysis of the input data  Planning of output
  • 6.  Series of procedural steps required to solve a given problem is called an algorithm.  The construction of the algorithm is the stage which requires steps or operations which collectively solve 'a given problem.  An algorithm usually is in ordinary English language and use some mathematical symbols, if it is possible to solve a given problem in more than one ways  The choice of particular algorithm depends upon various such as its reliability, accuracy and ease of modification. Algorithm
  • 7.  One of the most important factor in the choice of an algorithm is the time requirement to execute it (after it in high level language) with the help of computer.  The algorithm which will least time when executed by a computer is considered the best.
  • 8.  Write an algorithm to print given roll number and name.  Step 1: Enter Roll number  Step 2: Enter Name  Step 3: Print Roll number  Step 4: Print name  Step 5: Stop EXAMPLE 01
  • 9.  Write an algorithm to print the first ten natural numbers.  Step-I: Select a counter A  Step-2: Initialize A as zero  Step-3: Add 1 to A  Step-4: Print A  Step-5: If A <10 then go to step-3  Step-6: Stop EXAMPLE 02
  • 10.  Write an algorithm to print the greatest number from two given numbers.  Step-I: Enter two numbers as A and B  Step-2: If A > B then Print A and go to step 4  Step-3: Print B  Step-4: Stop EXAMPLE 03
  • 11.  Write an algorithm to print a table of a given number  Step-1: Select two counters as B and C  Step-2: Initialize the counters B and C as zero  Step-3: Enter a, number of table as A  Step-4: Add 1 to B  Step-5: Multiply A to B and assign the result to C  Step-6: Print A; B and C  Step-7: Check the value of B; If B<1O then go to step-4  Step-8: Stop EXAMPLE 04
  • 12.  Write-an algorithm to print square and cubes from 1 to 5  Step-1: Select the counter A, B and C  Step-2: Initialize B and C as zero  Step-3: Initialize A as 1  Step-4: Calculate B as A*A  Step-5: Calculate C as A*A*A  Step-6: Print A, B, and C.  Step-7: Add 1 to A  Step-8: Check the value of A; if A < 5 then go to step-3  Step-9: Stop EXAMPLE 05
  • 13.  A flowchart is a pictorial representation of the steps of a involved in the procedure of solving any problem.  The first formal flowchart was designed by John Von Neumann‘  A flowchart is drawn before the program in written to ensure the instructions will be logically integrated.  A flowchart is not a complete program but It is an aid to programming. FLOWCHART
  • 14.  There are two types of flowchart, which are  System Flowchart  Program Flowchart  A system flowchart shows the flow of data throughout a data process as well as the flow into and out system. The system analyst will use such a design and to explain a data processing system.
  • 15.  Program flowchart is a pictorial representation of the method and sequence, to be followed for solving a particular problem.  There are several sets of the symbols, which are standardized by American National Standard Institute International Standard Organization (ISO) to draw the flowchart.  Most commonly used symbols are Oval, Parallelogram, Rectangle, Diamond, Arrows, Connectors.
  • 16.  Oval  This ‘symbol' is used for beginning or end of a flowchart. Therefore, it is also named as “TERMINAL” Start/End
  • 17.  PARALLELOGRAM:  This symbol is used for transfer of data between Central Processing Unit (CPU) output devices.  In the simple words we can say this symbol is used to represent and output operations.  Therefore, it is also known as INPUT/OUTPUT box. INPUT/ OUTPUT
  • 18.  RECTANGLE:  This symbol is used to represent any arithmetic operation or transfer of data.  This symbol is also known as PROCESS box. PROCESS
  • 19.  DIAMOND:  This symbol is used to test the condition or to ask question and on the their answers that decide a definite path from a number of alternatives  This symbols is also known as DECISION BOX.
  • 20.  ARROWS:  This symbol is used to show the direction of the flow  In a flowchart every line must have an arrow to indicate
  • 21.  CONNECTORS:  Connectors are used to join the different parts of a flowchart.  The use of connectors gives neat shape to the flowchart. there are two types of connector which are known as: (a) On page connector (b) Off page connector
  • 22.  (a) On Page Connector  On page Connector is represented by small circles.  In a flowchart whenever complexity in branching arises, this connectors used to connect one process with an other place
  • 23.  (b) Off Page Connector  This symbol is used for off page Connector.  In a complicated problem, flowchart may run into several pages. The part of the flowchart on different pages is connected with the help of Off Page Connector.
  • 24.  Write a program to read a number from keyboard, calculate the square of the number and display it on the screen.  1: Beginning of the program  2: Read the number from the keyboard  3: Calculate square of the Number  4: Print the Square of the Number  5: Stop END START READ Number CALCULATE (Number)2 PRINT (Number)2 EXAMPLE 01
  • 25.  Write a program to reads a number from keyboard, checks; whether number is positive or negative, if the number is positive it is printed as it , If number is negative then absolute value of the number is printed.  1. Beginning of program.  2. Read the number from the keyboard.  3. If N >0, go to step 7  4. Determine absolute value of N and assign the resulting value to A, go  5. Assigning the value of N to A  6: Print the value of A  7. End of program. EXAMPLE 02 START INPUT N PRINT A N = |N| NO IF N ≥ 0 A = N YES B START B
  • 26.  Draw flowchart to print given roll number and name.  Draw flowchart to print the first ten natural numbers.  Draw flowchart to print the greatest number from two given numbers.  Draw flowchart to print a table of a given number  Draw flowchart to print square and cubes from 1 to 5 EXERCISE
  • 27.  Draw flowchart to solve equation ax+b=0. Execute flowchart using following data (i) a=3, b=6 (ii) a=0, b=52  Draw flowchart to convert given temperature in Celsius scale into Fahrenheit scale (i) 20oC (ii) 40oC (iii) 0oC