Professional Documents
Culture Documents
Algorithm
Algorithm
Algorithm
PSEUDOCODE
& FLOWCHART
Pseudocode
Definition: Pseudocode consists of statements which are combination of English and c language that can be easily
translated into program.
• Generally pseudo code is a restatement of a problem as a list of steps in English like format that describes what
must be done to solve it.
• It is used at one stage of the development process and can be refined , made more precise gradually.
d. if the problem is too hard/big to translate directly ,is it possible to break the problem into simpler steps which
can be translated more easily.
Example : Pseudocode for computing the area of a
circle for a given radius.
step 1: start
step 3: A=3.141*r*r
Step 4: display A
Step 5: stop
Algorithm
• Not all procedures can be called an algorithm. An algorithm should have the following
• Unambiguous − Algorithm should be clear and unambiguous. Each of its steps (or phases),
and their inputs/outputs should be clear and must lead to only one meaning.
• Output − An algorithm should have 1 or more well-defined outputs, and should match the
desired output.
Algorithm :
End
Write a Pseudocode and algorithm to compute the area of circle for the given
radius.
Algorithm :
Step 1: [start]
Pseudocode: Begin
Algorithm :
pseudocode : Step 1: [start]
Algorithm :
pseudocode : Step 1: [start]
Begin
Step 1: start Step 2: [read length and breadth]