SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Mais procurados

Pseudocode flowcharts
Pseudocode flowchartsPseudocode flowcharts
Pseudocode flowcharts
nicky_walters
 
Introduction to Pseudocode
Introduction to PseudocodeIntroduction to Pseudocode
Introduction to Pseudocode
Damian T. Gordon
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back tracking
Tech_MX
 
Algorithms and flowcharts ppt (seminar presentation)..
 Algorithms and flowcharts  ppt (seminar presentation).. Algorithms and flowcharts  ppt (seminar presentation)..
Algorithms and flowcharts ppt (seminar presentation)..
Nagendra N
 

Mais procurados (20)

Pseudocode & flowchart examples
Pseudocode & flowchart examplesPseudocode & flowchart examples
Pseudocode & flowchart examples
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
Pseudocode flowcharts
Pseudocode flowchartsPseudocode flowcharts
Pseudocode flowcharts
 
Presentation on queue
Presentation on queuePresentation on queue
Presentation on queue
 
Tree - Data Structure
Tree - Data StructureTree - Data Structure
Tree - Data Structure
 
Introduction to Pseudocode
Introduction to PseudocodeIntroduction to Pseudocode
Introduction to Pseudocode
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back tracking
 
Banking Management System Project documentation
Banking Management System Project documentationBanking Management System Project documentation
Banking Management System Project documentation
 
Flowchart pseudocode-examples
Flowchart pseudocode-examplesFlowchart pseudocode-examples
Flowchart pseudocode-examples
 
Binary to Decimal Conversion
Binary to Decimal ConversionBinary to Decimal Conversion
Binary to Decimal Conversion
 
Greedy Algorihm
Greedy AlgorihmGreedy Algorihm
Greedy Algorihm
 
Algorithms and flowcharts ppt (seminar presentation)..
 Algorithms and flowcharts  ppt (seminar presentation).. Algorithms and flowcharts  ppt (seminar presentation)..
Algorithms and flowcharts ppt (seminar presentation)..
 
Flowchart and algorithm
Flowchart and algorithmFlowchart and algorithm
Flowchart and algorithm
 
Ascii codes
Ascii codesAscii codes
Ascii codes
 
Flow chart and pseudo code
Flow chart and pseudo code Flow chart and pseudo code
Flow chart and pseudo code
 
Ascii 03
Ascii 03Ascii 03
Ascii 03
 
Lecture Note-1: Algorithm and Its Properties
Lecture Note-1: Algorithm and Its PropertiesLecture Note-1: Algorithm and Its Properties
Lecture Note-1: Algorithm and Its Properties
 
Currency converter
Currency converterCurrency converter
Currency converter
 
Data Representation
Data RepresentationData Representation
Data Representation
 
What is an algorithm?
What is an algorithm?What is an algorithm?
What is an algorithm?
 

Destaque

Scientific & Technical Writing Program
Scientific & Technical Writing ProgramScientific & Technical Writing Program
Scientific & Technical Writing Program
antugarg
 
Algorithm and pseudo codes
Algorithm and pseudo codesAlgorithm and pseudo codes
Algorithm and pseudo codes
hermiraguilar
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
luhkahreth
 

Destaque (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
 

Semelhante a Flowchart and algorithm

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
RSathyaPriyaCSEKIOT
 
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
ssuser2f67c91
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowcharts
khair20
 
11º estadistica 5 e 2t
11º estadistica 5 e  2t11º estadistica 5 e  2t
11º estadistica 5 e 2t
IanMojica
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
rajnidhiman
 

Semelhante a 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
 
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
 
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
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowcharts
 
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
 
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
 

Último

Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
pritamlangde
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
HenryBriggs2
 

Último (20)

Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
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
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx
457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx
457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx
 
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
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
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
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
 
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
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
 

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