Algorithm and Flow Chart
Algorithm and Flow Chart
Algorithm
&
Flow Chart
Class 10th computers
Presented by
Anees Ahmed Awan
Roll No. BC180400258
Department of Education
Virtual University of Pakistan
Algorithms and Flowcharts
A typical programming task can be divided into two
phases:
Problem solving phase
Produce an ordered sequence of steps that describe solution
of problem this sequence of steps is called an algorithm
Implementation phase
implement the program in some programming language
Algorithms
An algorithm is a finite set of steps defining the solution of a particular
problem.
Need not to belong one particular language
Sequence of English statements can also be algorithm
It is not a computer program
An algorithm can be expressed in English like languages
Its can also be expressed in the form of flowchart.
Example
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.
Detailed Algorithm
Step 1: Input M1,M2,M3,M4
Step 2: GRADE (M1+M2+M3+M4)/4
Step 3: if (GRADE < 50) then
Print “FAIL”
else
Print “PASS”
End
Computer Program ?
Set of instructions to perform some specific task