SlideShare a Scribd company logo
1 of 10
Write an algorithm for 
finding the average of two 
numbers and also draw a 
flowchart
Algorithm: 
Input: two numbers x and y 
Output: the average of x and y 
Step 1 : input x,y 
Step 2: sum=0,average=0 
Step 3:sum = x + y 
Step 4:average = sum /2 
Step 5: print average
START 
Input x 
Sum=average 
=0 
Sum = x + y 
Average = sum/2 
Print 
Average 
END
sums all the even numbers 
between 1 and 20 inclusive 
and then displays the sum
Step 1: start 
Step 2:sum = 0 ,count = 1 
Step 3: if count /2==0 then goto step 4 
Step 4:sum = sum + count 
step 5:count = count + 1 
Step 6:if count <20 then go to step 3 
step 7: DISPLAY sum 
Step 8: stop
To find the sum of first 50 natural numbers. 
Step 1: start 
Step 2:sum = 0 ,N= 0 
Step 3: N=N+1 
Step 4:sum = sum + N 
step 5:if SUM<50 then go to step 3 
Step 6:DISPLAY sum 
Step 7: stop
Step 1:start 
Step 2:Input x, y 
Step 3:Sum = x + y 
Step 4:Average = sum/2 
Step 5:Output Average 
Step 6:END

More Related Content

What's hot

Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1rajnidhiman
 
Call by value or call by reference in C++
Call by value or call by reference in C++Call by value or call by reference in C++
Call by value or call by reference in C++Sachin Yadav
 
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
 
C and its errors
C and its errorsC and its errors
C and its errorsJunaid Raja
 
pseudo code basics
pseudo code basicspseudo code basics
pseudo code basicsSabik T S
 
Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm designNahid Hasan
 
What is an algorithm?
What is an algorithm?What is an algorithm?
What is an algorithm?Angela DeHart
 
Introduction to oops concepts
Introduction to oops conceptsIntroduction to oops concepts
Introduction to oops conceptsNilesh Dalvi
 
Chapter #1 overview of programming and problem solving
Chapter #1 overview of programming and problem solvingChapter #1 overview of programming and problem solving
Chapter #1 overview of programming and problem solvingAbdul Shah
 
Introduction to Pseudocode
Introduction to PseudocodeIntroduction to Pseudocode
Introduction to PseudocodeDamian T. Gordon
 
Basics of c++ Programming Language
Basics of c++ Programming LanguageBasics of c++ Programming Language
Basics of c++ Programming LanguageAhmad Idrees
 

What's hot (20)

Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
 
Introduction to problem solving in C
Introduction to problem solving in CIntroduction to problem solving in C
Introduction to problem solving in C
 
Procedural programming
Procedural programmingProcedural programming
Procedural programming
 
Call by value or call by reference in C++
Call by value or call by reference in C++Call by value or call by reference in C++
Call by value or call by reference in C++
 
Algorithm and Programming (Introduction of Algorithms)
Algorithm and Programming (Introduction of Algorithms)Algorithm and Programming (Introduction of Algorithms)
Algorithm and Programming (Introduction of Algorithms)
 
Pseudocode
PseudocodePseudocode
Pseudocode
 
C and its errors
C and its errorsC and its errors
C and its errors
 
algo
algoalgo
algo
 
pseudo code basics
pseudo code basicspseudo code basics
pseudo code basics
 
Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm design
 
What is an algorithm?
What is an algorithm?What is an algorithm?
What is an algorithm?
 
Python programming : Standard Input and Output
Python programming : Standard Input and OutputPython programming : Standard Input and Output
Python programming : Standard Input and Output
 
C++ Overview PPT
C++ Overview PPTC++ Overview PPT
C++ Overview PPT
 
Introduction to oops concepts
Introduction to oops conceptsIntroduction to oops concepts
Introduction to oops concepts
 
Basics of c++
Basics of c++Basics of c++
Basics of c++
 
Programming Fundamentals
Programming FundamentalsProgramming Fundamentals
Programming Fundamentals
 
Chapter #1 overview of programming and problem solving
Chapter #1 overview of programming and problem solvingChapter #1 overview of programming and problem solving
Chapter #1 overview of programming and problem solving
 
Introduction to Pseudocode
Introduction to PseudocodeIntroduction to Pseudocode
Introduction to Pseudocode
 
Basics of c++ Programming Language
Basics of c++ Programming LanguageBasics of c++ Programming Language
Basics of c++ Programming Language
 
Functions in c
Functions in cFunctions in c
Functions in c
 

Viewers also liked

2011 Grants Writing Program
2011 Grants Writing Program2011 Grants Writing Program
2011 Grants Writing ProgramCPA Australia
 
Writing Effective Program Designs
Writing Effective Program DesignsWriting Effective Program Designs
Writing Effective Program Designs4Good.org
 
Scientific & Technical Writing Program
Scientific & Technical Writing ProgramScientific & Technical Writing Program
Scientific & Technical Writing Programantugarg
 
Effective program writing
Effective program writingEffective program writing
Effective program writingTracey Pearson
 
Writing program diapositivas
Writing program diapositivasWriting program diapositivas
Writing program diapositivasedithverdezoto
 
Algorithm and flowchart2010
Algorithm and flowchart2010Algorithm and flowchart2010
Algorithm and flowchart2010Jordan Delacruz
 
Algorithm and pseudo codes
Algorithm and pseudo codesAlgorithm and pseudo codes
Algorithm and pseudo codeshermiraguilar
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1luhkahreth
 

Viewers also liked (11)

Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
Writing algorithms
Writing algorithmsWriting algorithms
Writing algorithms
 
2011 Grants Writing Program
2011 Grants Writing Program2011 Grants Writing Program
2011 Grants Writing Program
 
Writing Effective Program Designs
Writing Effective Program DesignsWriting Effective Program Designs
Writing Effective Program Designs
 
Scientific & Technical Writing Program
Scientific & Technical Writing ProgramScientific & Technical Writing Program
Scientific & Technical Writing Program
 
Effective program writing
Effective program writingEffective program writing
Effective program writing
 
Writing program diapositivas
Writing program diapositivasWriting program diapositivas
Writing program diapositivas
 
Algorithm and flowchart2010
Algorithm and flowchart2010Algorithm and flowchart2010
Algorithm and flowchart2010
 
Algorithms
AlgorithmsAlgorithms
Algorithms
 
Algorithm and pseudo codes
Algorithm and pseudo codesAlgorithm and pseudo codes
Algorithm and pseudo codes
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
 

Similar to Flowchart and algorithm

UNIT I - Algorithmic Problem Solving.pptx
UNIT I - Algorithmic Problem Solving.pptxUNIT I - Algorithmic Problem Solving.pptx
UNIT I - Algorithmic Problem Solving.pptxPradeepkumar964266
 
ALGORITHMS AND FLOWCHARTS
ALGORITHMS AND FLOWCHARTSALGORITHMS AND FLOWCHARTS
ALGORITHMS AND FLOWCHARTSKate Campbell
 
Flowchart pseudocode-examples
Flowchart pseudocode-examplesFlowchart pseudocode-examples
Flowchart pseudocode-examplesGautam Roy
 
25422733 c-programming-and-data-structures-lab-manual
25422733 c-programming-and-data-structures-lab-manual25422733 c-programming-and-data-structures-lab-manual
25422733 c-programming-and-data-structures-lab-manualkamesh dagia
 
Psuedocode1, algorithm1, Flowchart1.pptx
Psuedocode1, algorithm1, Flowchart1.pptxPsuedocode1, algorithm1, Flowchart1.pptx
Psuedocode1, algorithm1, Flowchart1.pptxMattFlordeliza1
 
UNIT I_PSPP - Illustrative Problems (1).pptx
UNIT I_PSPP - Illustrative Problems (1).pptxUNIT I_PSPP - Illustrative Problems (1).pptx
UNIT I_PSPP - Illustrative Problems (1).pptxRSathyaPriyaCSEKIOT
 
ICT_Seminar_flow_charts_for_2013_Nov.pptx
ICT_Seminar_flow_charts_for_2013_Nov.pptxICT_Seminar_flow_charts_for_2013_Nov.pptx
ICT_Seminar_flow_charts_for_2013_Nov.pptxssuser2f67c91
 
Problem solving using Programming
Problem solving using ProgrammingProblem solving using Programming
Problem solving using ProgrammingKuppusamy P
 
Flow chart and pseudo code
Flow chart and pseudo code Flow chart and pseudo code
Flow chart and pseudo code Niva tharan
 
Csci101 lect03 algorithms_i
Csci101 lect03 algorithms_iCsci101 lect03 algorithms_i
Csci101 lect03 algorithms_iElsayed Hemayed
 
Factors and Multiples.pptx
Factors and Multiples.pptxFactors and Multiples.pptx
Factors and Multiples.pptxAsha Shekhar
 
Chapter iii: Number System
Chapter iii: Number SystemChapter iii: Number System
Chapter iii: Number Systemkclove
 
Best Techniques To Design Programs - Program Designing Techniques
Best Techniques To Design Programs - Program Designing TechniquesBest Techniques To Design Programs - Program Designing Techniques
Best Techniques To Design Programs - Program Designing TechniquesTech
 
11º estadistica 5 e 2t
11º estadistica 5 e  2t11º estadistica 5 e  2t
11º estadistica 5 e 2tIanMojica
 
Chapter 5 exercises Balagurusamy Programming ANSI in c
Chapter 5 exercises Balagurusamy Programming ANSI  in cChapter 5 exercises Balagurusamy Programming ANSI  in c
Chapter 5 exercises Balagurusamy Programming ANSI in cBUBT
 
New ways of multiplying numbers
New ways of multiplying numbersNew ways of multiplying numbers
New ways of multiplying numbersiosrjce
 
Calculation of arithmetic mean
Calculation of arithmetic meanCalculation of arithmetic mean
Calculation of arithmetic meanSajina Nair
 

Similar to Flowchart and algorithm (20)

Algorithm
AlgorithmAlgorithm
Algorithm
 
UNIT I - Algorithmic Problem Solving.pptx
UNIT I - Algorithmic Problem Solving.pptxUNIT I - Algorithmic Problem Solving.pptx
UNIT I - Algorithmic Problem Solving.pptx
 
ALGORITHMS AND FLOWCHARTS
ALGORITHMS AND FLOWCHARTSALGORITHMS AND FLOWCHARTS
ALGORITHMS AND FLOWCHARTS
 
Flowchart pseudocode-examples
Flowchart pseudocode-examplesFlowchart pseudocode-examples
Flowchart pseudocode-examples
 
25422733 c-programming-and-data-structures-lab-manual
25422733 c-programming-and-data-structures-lab-manual25422733 c-programming-and-data-structures-lab-manual
25422733 c-programming-and-data-structures-lab-manual
 
Psuedocode1, algorithm1, Flowchart1.pptx
Psuedocode1, algorithm1, Flowchart1.pptxPsuedocode1, algorithm1, Flowchart1.pptx
Psuedocode1, algorithm1, Flowchart1.pptx
 
UNIT I_PSPP - Illustrative Problems (1).pptx
UNIT I_PSPP - Illustrative Problems (1).pptxUNIT I_PSPP - Illustrative Problems (1).pptx
UNIT I_PSPP - Illustrative Problems (1).pptx
 
ICT_Seminar_flow_charts_for_2013_Nov.pptx
ICT_Seminar_flow_charts_for_2013_Nov.pptxICT_Seminar_flow_charts_for_2013_Nov.pptx
ICT_Seminar_flow_charts_for_2013_Nov.pptx
 
Problem solving using Programming
Problem solving using ProgrammingProblem solving using Programming
Problem solving using Programming
 
Flow chart and pseudo code
Flow chart and pseudo code Flow chart and pseudo code
Flow chart and pseudo code
 
Csci101 lect03 algorithms_i
Csci101 lect03 algorithms_iCsci101 lect03 algorithms_i
Csci101 lect03 algorithms_i
 
Factors and Multiples.pptx
Factors and Multiples.pptxFactors and Multiples.pptx
Factors and Multiples.pptx
 
Uta005 lecture3
Uta005 lecture3Uta005 lecture3
Uta005 lecture3
 
Chapter iii: Number System
Chapter iii: Number SystemChapter iii: Number System
Chapter iii: Number System
 
Best Techniques To Design Programs - Program Designing Techniques
Best Techniques To Design Programs - Program Designing TechniquesBest Techniques To Design Programs - Program Designing Techniques
Best Techniques To Design Programs - Program Designing Techniques
 
11º estadistica 5 e 2t
11º estadistica 5 e  2t11º estadistica 5 e  2t
11º estadistica 5 e 2t
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
 
Chapter 5 exercises Balagurusamy Programming ANSI in c
Chapter 5 exercises Balagurusamy Programming ANSI  in cChapter 5 exercises Balagurusamy Programming ANSI  in c
Chapter 5 exercises Balagurusamy Programming ANSI in c
 
New ways of multiplying numbers
New ways of multiplying numbersNew ways of multiplying numbers
New ways of multiplying numbers
 
Calculation of arithmetic mean
Calculation of arithmetic meanCalculation of arithmetic mean
Calculation of arithmetic mean
 

Recently uploaded

Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesRAJNEESHKUMAR341697
 
Rums floating Omkareshwar FSPV IM_16112021.pdf
Rums floating Omkareshwar FSPV IM_16112021.pdfRums floating Omkareshwar FSPV IM_16112021.pdf
Rums floating Omkareshwar FSPV IM_16112021.pdfsmsksolar
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwaitjaanualu31
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network DevicesChandrakantDivate1
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadhamedmustafa094
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxSCMS School of Architecture
 
Learn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic MarksLearn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic MarksMagic Marks
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesMayuraD1
 

Recently uploaded (20)

FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
Rums floating Omkareshwar FSPV IM_16112021.pdf
Rums floating Omkareshwar FSPV IM_16112021.pdfRums floating Omkareshwar FSPV IM_16112021.pdf
Rums floating Omkareshwar FSPV IM_16112021.pdf
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Learn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic MarksLearn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic Marks
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 

Flowchart and algorithm

  • 1.
  • 2. Write an algorithm for finding the average of two numbers and also draw a flowchart
  • 3. Algorithm: Input: two numbers x and y Output: the average of x and y Step 1 : input x,y Step 2: sum=0,average=0 Step 3:sum = x + y Step 4:average = sum /2 Step 5: print average
  • 4. START Input x Sum=average =0 Sum = x + y Average = sum/2 Print Average END
  • 5. sums all the even numbers between 1 and 20 inclusive and then displays the sum
  • 6. Step 1: start Step 2:sum = 0 ,count = 1 Step 3: if count /2==0 then goto step 4 Step 4:sum = sum + count step 5:count = count + 1 Step 6:if count <20 then go to step 3 step 7: DISPLAY sum Step 8: stop
  • 7.
  • 8. To find the sum of first 50 natural numbers. Step 1: start Step 2:sum = 0 ,N= 0 Step 3: N=N+1 Step 4:sum = sum + N step 5:if SUM<50 then go to step 3 Step 6:DISPLAY sum Step 7: stop
  • 9.
  • 10. Step 1:start Step 2:Input x, y Step 3:Sum = x + y Step 4:Average = sum/2 Step 5:Output Average Step 6:END