flowchart & algorithms

Student
StudentStudent
Flowcharts and algorithms
Prepared by:
Ravi Bharadva 130110120007
Hemdeep Bhavsar 130110120008
Nayan Chauhan 130110120009
Chintan Kathrecha 130110120010
Chitt Kakadia 130110120011
Yashraj Chudasama 130110120012
Faculty
J.V SIR
WHAT IS ALGORITHM?
Algorithm
 An algorithm is the finite set of sequential
instructions to accomplish a task where instructions
are written in a simple English language.
 It is called as a step by step solution of the program.
 It is a well developed, organized approach to solving
complex problems.
 It refers to logic of program.
 It is step by step solution to given program.
Characteristics of algorithm
 Algorithm has four characteristics:
 Finiteness : Total number of steps used in algorithm
should be finite.
 Definiteness : Each step of algorithm must be clear
and un ambiguous.
 Effectiveness : Every step must be basic and
essential.
 Input & output: the algorithm must accept zero or
more input and must produce at least one output.
How to develop an algorithm
 First identify different inputs to be given to system.
 Then identify what output you want from the
program.
 Then create logic for it.
 Break that logic into simple steps.
 Write this steps in order.
 This forms the algorithm required from the given
logic.
Advantages Disadvantages
 Very easy to write.
 Easy technique to
understand logic.
 Easy identification of
the mistakes by non
computer person.
 Time consuming.
 Difficult to show
branching and looping.
 Big tasks are difficult to
put in algorithm.
Write an algorithm to calculate area of
rectangle.
 Step 1: accept value of length i.e l
 Step 2: Accept the value of breadth i.e b
 Step 3: calculate area. i.e a=l*b
 Step 4: print area i.e Print a.
 Step 5: stop
Create a program to get name and roll
number from user and print it!
 Step 1: Initialize name as character and roll number
as integer
 Step2: Display message “ENTER NAME:” on screen
 Step 3: Get name from user
 STEP 4: Display message “ENTER R.NO:”
 Step 5: Get Roll number from USER
 STEP 6: clear the screen
 STEP 7: Print name on screen
 STEP 8: Print roll number on screen
 STEP 9: STOP
Write an algorithm to
determine a student’s final grade and
indicate whether it is passing or failing.
The final grade is calculated as the
average of four marks.
 Step 1: input a set of 4 marks
 Step 2: calculate average of marks
 Step 3: if avg <50 then go to next step else go to step
5.
 Step 4: print fail.
 Step 5: print pass.
 Step 6: stop
Write a algorithm to find out smallest
number out of two numbers.
 Step 1: Accept Two number I.e a,b
 Step 2: check if a<b? if yes go to step 3 else go to
step 5.
 Step 3: Print a is smallest number.
 Step 4: stop
 Step 5: print b is smallest number.
 Step 6 : stop
WHAT IS FLOWCHART?
What is a flowchart?
 It is a pictorial representation of the algorithm.
 What we did in algorithm, we can represent it in
flowchart.
 This format is easy to understand.
 It shows us the flow of the instructions.
Symbols of flowchart
Name Symbol Use in flowchart
Oval Used at starting and at
ending of the program.
Flowlines Used to show direction
of the flow.
Parallelogram Used for input output
options.
Rectangle Denotes process to be
carried out.
Symbols of flowchart
round
Diamond It is used for showing
decision structure.
Round Connecting flow lines
from different places
Block Indicates block of
statements or body of
loop
Advantages Disadvantages
 Easy to draw.
 Easy technique to
understand logic.
 Easy to identify the
mistake by non
computer person.
 Easy for branching and
looping.
 Time consuming.
 Difficult for modification.
 Difficult task to draw
flow charts for big
programs.
Different operators used in programing
 Determine how one value relates to another
 Equal to ==
 Not equal to !=
 Less than <
 Greater than >
 Less than or Equal to <=
 Greater than or Equal to >=
flowchart & algorithms
flowchart & algorithms
flowchart & algorithms
flowchart & algorithms
flowchart & algorithms
flowchart & algorithms
flowchart & algorithms
flowchart & algorithms
flowchart & algorithms
flowchart & algorithms
flowchart & algorithms
Example : write an algorithm and flowchart for
converting length in feet to centimeter.
 Algorithm:
 Step1: input l in ft
 Step 2: L in cm= l in ft*30
 Step 3: Print l in cm.
 Flowchart:
in ft
start
Read
value of l
L in cm= l in ft*30
Print l in cm
stop
Example: write an algorithm and flowchart to
read 2 sides of rectangle and calc. its area.
 Algorithm:
 Step1: read input W,L.
 Step2: A=W*L
 Step3: print A
 Flowchart:
 Read W,L
start
Read
value of W
& L
A= L*W;A = L * W
Print area
A
stop
Any questions?
flowchart & algorithms
1 de 31

Recomendados

Algorithm and flowchart por
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchartSachin Goyani
7.1K vistas34 diapositivas
algo por
algoalgo
algoRao Khan
1.5K vistas15 diapositivas
Flowcharts and algorithms por
Flowcharts and algorithmsFlowcharts and algorithms
Flowcharts and algorithmsStudent
5.9K vistas12 diapositivas
Algorithm and flowchart por
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchartRabin BK
10.7K vistas17 diapositivas
Keywords, identifiers ,datatypes in C++ por
Keywords, identifiers ,datatypes in C++Keywords, identifiers ,datatypes in C++
Keywords, identifiers ,datatypes in C++Ankur Pandey
358 vistas34 diapositivas
Daa por
DaaDaa
DaaDhananjay Singh
4.5K vistas80 diapositivas

Más contenido relacionado

La actualidad más candente

Introduction to Compiler design por
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design Dr. C.V. Suresh Babu
6.4K vistas31 diapositivas
Introduction to Algorithms Complexity Analysis por
Introduction to Algorithms Complexity Analysis Introduction to Algorithms Complexity Analysis
Introduction to Algorithms Complexity Analysis Dr. Pankaj Agarwal
2.6K vistas128 diapositivas
Chapter 16 Dictionaries por
Chapter 16 DictionariesChapter 16 Dictionaries
Chapter 16 Dictionariespraveenjigajinni
4.6K vistas44 diapositivas
Algorithm and pseudo codes por
Algorithm and pseudo codesAlgorithm and pseudo codes
Algorithm and pseudo codeshermiraguilar
48.2K vistas44 diapositivas
Algorithmsandflowcharts1 por
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1luhkahreth
49.7K vistas32 diapositivas
Introduction to data structures and Algorithm por
Introduction to data structures and AlgorithmIntroduction to data structures and Algorithm
Introduction to data structures and AlgorithmDhaval Kaneria
45.6K vistas73 diapositivas

La actualidad más candente(20)

Introduction to Algorithms Complexity Analysis por Dr. Pankaj Agarwal
Introduction to Algorithms Complexity Analysis Introduction to Algorithms Complexity Analysis
Introduction to Algorithms Complexity Analysis
Dr. Pankaj Agarwal2.6K vistas
Algorithm and pseudo codes por hermiraguilar
Algorithm and pseudo codesAlgorithm and pseudo codes
Algorithm and pseudo codes
hermiraguilar48.2K vistas
Algorithmsandflowcharts1 por luhkahreth
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
luhkahreth49.7K vistas
Introduction to data structures and Algorithm por Dhaval Kaneria
Introduction to data structures and AlgorithmIntroduction to data structures and Algorithm
Introduction to data structures and Algorithm
Dhaval Kaneria45.6K vistas
Introduction to Pseudocode por Damian T. Gordon
Introduction to PseudocodeIntroduction to Pseudocode
Introduction to Pseudocode
Damian T. Gordon339.4K vistas
Unit 1. Problem Solving with Computer por Ashim Lamichhane
Unit 1. Problem Solving with Computer   Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer
Ashim Lamichhane35.3K vistas
Chapter 6 algorithms and flow charts por praveenjigajinni
Chapter 6  algorithms and flow chartsChapter 6  algorithms and flow charts
Chapter 6 algorithms and flow charts
praveenjigajinni8.5K vistas
Algorithms, flow charts and pseudocodes por Satveer Mann
Algorithms, flow charts and pseudocodesAlgorithms, flow charts and pseudocodes
Algorithms, flow charts and pseudocodes
Satveer Mann377 vistas
Turing Machine por Rajendran
Turing MachineTuring Machine
Turing Machine
Rajendran 17.5K vistas
What is an algorithm? por Angela DeHart
What is an algorithm?What is an algorithm?
What is an algorithm?
Angela DeHart18.5K vistas
Design & Analysis of Algorithms Lecture Notes por FellowBuddy.com
Design & Analysis of Algorithms Lecture NotesDesign & Analysis of Algorithms Lecture Notes
Design & Analysis of Algorithms Lecture Notes
FellowBuddy.com2.9K vistas
Rotor machine,subsitution technique por kirupasuchi1996
Rotor machine,subsitution techniqueRotor machine,subsitution technique
Rotor machine,subsitution technique
kirupasuchi19962.7K vistas

Destacado

3 algorithm-and-flowchart por
3 algorithm-and-flowchart3 algorithm-and-flowchart
3 algorithm-and-flowchartRohit Shrivastava
15.1K vistas37 diapositivas
algorithm por
algorithmalgorithm
algorithmDivya Ravindran
1.2K vistas30 diapositivas
Algorithm Design por
Algorithm DesignAlgorithm Design
Algorithm DesignMD.ASHIQUZZAMAN KHONDAKER
1.2K vistas21 diapositivas
Flowchart for volume and surface area of cylinder por
Flowchart for volume and surface area of cylinderFlowchart for volume and surface area of cylinder
Flowchart for volume and surface area of cylinderMaurice
30.1K vistas1 diapositiva
Flowcharts por
FlowchartsFlowcharts
FlowchartsMukesh Tekwani
23.9K vistas21 diapositivas
Pengenalan kepada pengaturcaraan berstruktur por
Pengenalan kepada pengaturcaraan berstrukturPengenalan kepada pengaturcaraan berstruktur
Pengenalan kepada pengaturcaraan berstrukturUnit Kediaman Luar Kampus
2.4K vistas37 diapositivas

Destacado(18)

Flowchart for volume and surface area of cylinder por Maurice
Flowchart for volume and surface area of cylinderFlowchart for volume and surface area of cylinder
Flowchart for volume and surface area of cylinder
Maurice30.1K vistas
Algorithm Design Presentation por Kawsar Ahmed
Algorithm Design PresentationAlgorithm Design Presentation
Algorithm Design Presentation
Kawsar Ahmed8.4K vistas
Pak 1974-na-committe-ahmadiyya.vOL 5 por muzaffertahir9
Pak 1974-na-committe-ahmadiyya.vOL 5Pak 1974-na-committe-ahmadiyya.vOL 5
Pak 1974-na-committe-ahmadiyya.vOL 5
muzaffertahir91.3K vistas
Economic environment unit6 por UNBFS
Economic environment unit6Economic environment unit6
Economic environment unit6
UNBFS344 vistas
What's a Good Chinese Daily Deal - A Market Analysis - May 2011 - Dataotuan.com por dataotuan
What's a Good Chinese Daily Deal - A Market Analysis - May 2011 - Dataotuan.com What's a Good Chinese Daily Deal - A Market Analysis - May 2011 - Dataotuan.com
What's a Good Chinese Daily Deal - A Market Analysis - May 2011 - Dataotuan.com
dataotuan1.3K vistas
Building Creative Product Extensions with Experience Manager por connectwebex
Building Creative Product Extensions with Experience ManagerBuilding Creative Product Extensions with Experience Manager
Building Creative Product Extensions with Experience Manager
connectwebex461 vistas
LODOLs por gregtree
LODOLsLODOLs
LODOLs
gregtree768 vistas
Spine X Live2D 百萬智多星製作經驗談 por Scissor Lee
Spine X Live2D 百萬智多星製作經驗談Spine X Live2D 百萬智多星製作經驗談
Spine X Live2D 百萬智多星製作經驗談
Scissor Lee981 vistas
Cele Album por casjenni
Cele AlbumCele Album
Cele Album
casjenni533 vistas
Pass Love Charity Foundation (PLCF) por PassLoveCharity
Pass Love Charity Foundation (PLCF)Pass Love Charity Foundation (PLCF)
Pass Love Charity Foundation (PLCF)
PassLoveCharity824 vistas
Stokvis Tapes por stokvis
Stokvis TapesStokvis Tapes
Stokvis Tapes
stokvis1.4K vistas

Similar a flowchart & algorithms

Logic Development and Algorithm. por
Logic Development and Algorithm.Logic Development and Algorithm.
Logic Development and Algorithm.NandiniSidana
336 vistas34 diapositivas
Problem solving methodology por
Problem solving methodologyProblem solving methodology
Problem solving methodologyProf. Dr. K. Adisesha
860 vistas12 diapositivas
AlgorithmAndFlowChart.pdf por
AlgorithmAndFlowChart.pdfAlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdfSusieMaestre1
118 vistas29 diapositivas
Chap6 por
Chap6Chap6
Chap6artipradhan
2.7K vistas21 diapositivas
Software develop.... por
Software develop.... Software develop....
Software develop.... GCWUS
412 vistas23 diapositivas
Algorithm and flowchart.pptx por
Algorithm and flowchart.pptxAlgorithm and flowchart.pptx
Algorithm and flowchart.pptxMaheShiva
491 vistas18 diapositivas

Similar a flowchart & algorithms(20)

Logic Development and Algorithm. por NandiniSidana
Logic Development and Algorithm.Logic Development and Algorithm.
Logic Development and Algorithm.
NandiniSidana336 vistas
AlgorithmAndFlowChart.pdf por SusieMaestre1
AlgorithmAndFlowChart.pdfAlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdf
SusieMaestre1118 vistas
Software develop.... por GCWUS
Software develop.... Software develop....
Software develop....
GCWUS412 vistas
Algorithm and flowchart.pptx por MaheShiva
Algorithm and flowchart.pptxAlgorithm and flowchart.pptx
Algorithm and flowchart.pptx
MaheShiva491 vistas
algorithms and flow chart overview.pdf por AmanPratik11
algorithms and flow chart overview.pdfalgorithms and flow chart overview.pdf
algorithms and flow chart overview.pdf
AmanPratik11189 vistas
Fundamental of Information Technology - UNIT 6 por Shipra Swati
Fundamental of Information Technology - UNIT 6Fundamental of Information Technology - UNIT 6
Fundamental of Information Technology - UNIT 6
Shipra Swati715 vistas
Chapter 2 representation of algorithms 2 por Li-Anne Serrano
Chapter 2 representation of algorithms 2Chapter 2 representation of algorithms 2
Chapter 2 representation of algorithms 2
Li-Anne Serrano1.5K vistas
Chapter 2 Representation Of Algorithms 2 por Li-Anne Serrano
Chapter 2  Representation Of  Algorithms 2Chapter 2  Representation Of  Algorithms 2
Chapter 2 Representation Of Algorithms 2
Li-Anne Serrano3.3K vistas
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHM por Rc Os
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHMCLASS VIII COMPUTERS FLOW CHART AND ALGORITHM
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHM
Rc Os13K vistas
Unit 3 Foc por JAYA
Unit  3 FocUnit  3 Foc
Unit 3 Foc
JAYA5.4K vistas

Más de Student

Solids por
SolidsSolids
SolidsStudent
902 vistas34 diapositivas
PROJECTION OF POINTS por
PROJECTION OF POINTSPROJECTION OF POINTS
PROJECTION OF POINTSStudent
1.2K vistas16 diapositivas
Engineering Planes por
Engineering PlanesEngineering Planes
Engineering PlanesStudent
420 vistas31 diapositivas
Orthographic projection por
Orthographic projectionOrthographic projection
Orthographic projectionStudent
1.8K vistas186 diapositivas
Engineering line por
Engineering lineEngineering line
Engineering lineStudent
429 vistas55 diapositivas
Engineering graphics por
Engineering graphicsEngineering graphics
Engineering graphicsStudent
1.7K vistas283 diapositivas

Más de Student(15)

Solids por Student
SolidsSolids
Solids
Student902 vistas
PROJECTION OF POINTS por Student
PROJECTION OF POINTSPROJECTION OF POINTS
PROJECTION OF POINTS
Student1.2K vistas
Engineering Planes por Student
Engineering PlanesEngineering Planes
Engineering Planes
Student420 vistas
Orthographic projection por Student
Orthographic projectionOrthographic projection
Orthographic projection
Student1.8K vistas
Engineering line por Student
Engineering lineEngineering line
Engineering line
Student429 vistas
Engineering graphics por Student
Engineering graphicsEngineering graphics
Engineering graphics
Student1.7K vistas
Engineering Curves por Student
Engineering CurvesEngineering Curves
Engineering Curves
Student4.2K vistas
Intoduction to c language por Student
Intoduction to c languageIntoduction to c language
Intoduction to c language
Student717 vistas
Contributor personality development unit 2 por Student
Contributor personality  development unit 2Contributor personality  development unit 2
Contributor personality development unit 2
Student719 vistas
Gaussian elimination method & homogeneous linear equation por Student
Gaussian elimination method & homogeneous linear equationGaussian elimination method & homogeneous linear equation
Gaussian elimination method & homogeneous linear equation
Student8.2K vistas
Eme (air compressors) por Student
Eme (air compressors)Eme (air compressors)
Eme (air compressors)
Student3K vistas
Noise pollution por Student
Noise pollutionNoise pollution
Noise pollution
Student1.1K vistas
Land pollution por Student
Land pollutionLand pollution
Land pollution
Student2.1K vistas
13 mc558 eg por Student
13 mc558 eg13 mc558 eg
13 mc558 eg
Student304 vistas
Women social activities por Student
Women social activitiesWomen social activities
Women social activities
Student451 vistas

Último

SPICE PARK DEC2023 (6,625 SPICE Models) por
SPICE PARK DEC2023 (6,625 SPICE Models) SPICE PARK DEC2023 (6,625 SPICE Models)
SPICE PARK DEC2023 (6,625 SPICE Models) Tsuyoshi Horigome
28 vistas218 diapositivas
Effect of deep chemical mixing columns on properties of surrounding soft clay... por
Effect of deep chemical mixing columns on properties of surrounding soft clay...Effect of deep chemical mixing columns on properties of surrounding soft clay...
Effect of deep chemical mixing columns on properties of surrounding soft clay...AltinKaradagli
9 vistas10 diapositivas
802.11 Computer Networks por
802.11 Computer Networks802.11 Computer Networks
802.11 Computer NetworksTusharChoudhary72015
10 vistas33 diapositivas
What is Unit Testing por
What is Unit TestingWhat is Unit Testing
What is Unit TestingSadaaki Emura
24 vistas25 diapositivas
sam_software_eng_cv.pdf por
sam_software_eng_cv.pdfsam_software_eng_cv.pdf
sam_software_eng_cv.pdfsammyigbinovia
5 vistas5 diapositivas
MK__Cert.pdf por
MK__Cert.pdfMK__Cert.pdf
MK__Cert.pdfHassan Khan
11 vistas1 diapositiva

Último(20)

SPICE PARK DEC2023 (6,625 SPICE Models) por Tsuyoshi Horigome
SPICE PARK DEC2023 (6,625 SPICE Models) SPICE PARK DEC2023 (6,625 SPICE Models)
SPICE PARK DEC2023 (6,625 SPICE Models)
Tsuyoshi Horigome28 vistas
Effect of deep chemical mixing columns on properties of surrounding soft clay... por AltinKaradagli
Effect of deep chemical mixing columns on properties of surrounding soft clay...Effect of deep chemical mixing columns on properties of surrounding soft clay...
Effect of deep chemical mixing columns on properties of surrounding soft clay...
AltinKaradagli9 vistas
Proposal Presentation.pptx por keytonallamon
Proposal Presentation.pptxProposal Presentation.pptx
Proposal Presentation.pptx
keytonallamon42 vistas
Instrumentation & Control Lab Manual.pdf por NTU Faisalabad
Instrumentation & Control Lab Manual.pdfInstrumentation & Control Lab Manual.pdf
Instrumentation & Control Lab Manual.pdf
NTU Faisalabad 6 vistas
fakenews_DBDA_Mar23.pptx por deepmitra8
fakenews_DBDA_Mar23.pptxfakenews_DBDA_Mar23.pptx
fakenews_DBDA_Mar23.pptx
deepmitra815 vistas
Design of Structures and Foundations for Vibrating Machines, Arya-ONeill-Pinc... por csegroupvn
Design of Structures and Foundations for Vibrating Machines, Arya-ONeill-Pinc...Design of Structures and Foundations for Vibrating Machines, Arya-ONeill-Pinc...
Design of Structures and Foundations for Vibrating Machines, Arya-ONeill-Pinc...
csegroupvn5 vistas
GDSC Mikroskil Members Onboarding 2023.pdf por gdscmikroskil
GDSC Mikroskil Members Onboarding 2023.pdfGDSC Mikroskil Members Onboarding 2023.pdf
GDSC Mikroskil Members Onboarding 2023.pdf
gdscmikroskil53 vistas
SUMIT SQL PROJECT SUPERSTORE 1.pptx por Sumit Jadhav
SUMIT SQL PROJECT SUPERSTORE 1.pptxSUMIT SQL PROJECT SUPERSTORE 1.pptx
SUMIT SQL PROJECT SUPERSTORE 1.pptx
Sumit Jadhav 15 vistas
Design_Discover_Develop_Campaign.pptx por ShivanshSeth6
Design_Discover_Develop_Campaign.pptxDesign_Discover_Develop_Campaign.pptx
Design_Discover_Develop_Campaign.pptx
ShivanshSeth632 vistas
DevOps-ITverse-2023-IIT-DU.pptx por Anowar Hossain
DevOps-ITverse-2023-IIT-DU.pptxDevOps-ITverse-2023-IIT-DU.pptx
DevOps-ITverse-2023-IIT-DU.pptx
Anowar Hossain12 vistas
Update 42 models(Diode/General ) in SPICE PARK(DEC2023) por Tsuyoshi Horigome
Update 42 models(Diode/General ) in SPICE PARK(DEC2023)Update 42 models(Diode/General ) in SPICE PARK(DEC2023)
Update 42 models(Diode/General ) in SPICE PARK(DEC2023)
Tsuyoshi Horigome33 vistas

flowchart & algorithms

  • 1. Flowcharts and algorithms Prepared by: Ravi Bharadva 130110120007 Hemdeep Bhavsar 130110120008 Nayan Chauhan 130110120009 Chintan Kathrecha 130110120010 Chitt Kakadia 130110120011 Yashraj Chudasama 130110120012 Faculty J.V SIR
  • 3. Algorithm  An algorithm is the finite set of sequential instructions to accomplish a task where instructions are written in a simple English language.  It is called as a step by step solution of the program.  It is a well developed, organized approach to solving complex problems.  It refers to logic of program.  It is step by step solution to given program.
  • 4. Characteristics of algorithm  Algorithm has four characteristics:  Finiteness : Total number of steps used in algorithm should be finite.  Definiteness : Each step of algorithm must be clear and un ambiguous.  Effectiveness : Every step must be basic and essential.  Input & output: the algorithm must accept zero or more input and must produce at least one output.
  • 5. How to develop an algorithm  First identify different inputs to be given to system.  Then identify what output you want from the program.  Then create logic for it.  Break that logic into simple steps.  Write this steps in order.  This forms the algorithm required from the given logic.
  • 6. Advantages Disadvantages  Very easy to write.  Easy technique to understand logic.  Easy identification of the mistakes by non computer person.  Time consuming.  Difficult to show branching and looping.  Big tasks are difficult to put in algorithm.
  • 7. Write an algorithm to calculate area of rectangle.  Step 1: accept value of length i.e l  Step 2: Accept the value of breadth i.e b  Step 3: calculate area. i.e a=l*b  Step 4: print area i.e Print a.  Step 5: stop
  • 8. Create a program to get name and roll number from user and print it!  Step 1: Initialize name as character and roll number as integer  Step2: Display message “ENTER NAME:” on screen  Step 3: Get name from user  STEP 4: Display message “ENTER R.NO:”  Step 5: Get Roll number from USER  STEP 6: clear the screen  STEP 7: Print name on screen  STEP 8: Print roll number on screen  STEP 9: STOP
  • 9. Write an algorithm to determine a student’s final grade and indicate whether it is passing or failing. The final grade is calculated as the average of four marks.  Step 1: input a set of 4 marks  Step 2: calculate average of marks  Step 3: if avg <50 then go to next step else go to step 5.  Step 4: print fail.  Step 5: print pass.  Step 6: stop
  • 10. Write a algorithm to find out smallest number out of two numbers.  Step 1: Accept Two number I.e a,b  Step 2: check if a<b? if yes go to step 3 else go to step 5.  Step 3: Print a is smallest number.  Step 4: stop  Step 5: print b is smallest number.  Step 6 : stop
  • 12. What is a flowchart?  It is a pictorial representation of the algorithm.  What we did in algorithm, we can represent it in flowchart.  This format is easy to understand.  It shows us the flow of the instructions.
  • 13. Symbols of flowchart Name Symbol Use in flowchart Oval Used at starting and at ending of the program. Flowlines Used to show direction of the flow. Parallelogram Used for input output options. Rectangle Denotes process to be carried out.
  • 14. Symbols of flowchart round Diamond It is used for showing decision structure. Round Connecting flow lines from different places Block Indicates block of statements or body of loop
  • 15. Advantages Disadvantages  Easy to draw.  Easy technique to understand logic.  Easy to identify the mistake by non computer person.  Easy for branching and looping.  Time consuming.  Difficult for modification.  Difficult task to draw flow charts for big programs.
  • 16. Different operators used in programing  Determine how one value relates to another  Equal to ==  Not equal to !=  Less than <  Greater than >  Less than or Equal to <=  Greater than or Equal to >=
  • 28. Example : write an algorithm and flowchart for converting length in feet to centimeter.  Algorithm:  Step1: input l in ft  Step 2: L in cm= l in ft*30  Step 3: Print l in cm.  Flowchart: in ft start Read value of l L in cm= l in ft*30 Print l in cm stop
  • 29. Example: write an algorithm and flowchart to read 2 sides of rectangle and calc. its area.  Algorithm:  Step1: read input W,L.  Step2: A=W*L  Step3: print A  Flowchart:  Read W,L start Read value of W & L A= L*W;A = L * W Print area A stop