Algirithms and Flowcharts
Algirithms and Flowcharts
ALGORITHM:
The word “algorithm” relates to the name of the mathematician Al-khowarizmi, which means a procedure
or a technique. Software Engineer commonly uses an algorithm for planning and solving the problems. An
algorithm is a sequence of steps to solve a particular problem or algorithm is an ordered set of unambiguous
steps that produces a result and terminates in a finite time
Advantages of algorithm
The language used to write algorithm is simple and similar to day-to-day life language. The
variable names are used to store the values. The value store in variable can change in the solution
steps. In addition some special symbols are used as below:
HEIGHT 5
or HEIGHT = 5
The symbol ‘=’ is used in most of the programming language as an assignment symbol, the same
has been used in all the algorithms and flowcharts in the manual.
The statement C = A + B means that add the value stored in variable A and variable B then
assign/store the value in variable C.
The statement R = R + 1 means that add I to the value stored in variable R and then assign/store
the new value in variable R, in other words increase the value of variable R by 1
Mathematical Operators:
Relational Operators
Logical Operators
FLOWCHART:
The first design of flowchart goes back to 1945 which was designed by John Von Neumann. Unlike an
algorithm, Flowchart uses different symbols to design a solution to a problem. It is another commonly used
programming tool. By looking at a Flowchartone can understand the operations and sequence of operations
performed in a system. Flowchart is often considered as a blueprint of a design used for solving a specific
problem.
Advantages of flowchart:
Note: We can use keyword INPUT or READ or GET to accept input(s) /value(s) and keywords PRINT or
WRITE or DISPLAY to output the result(s).
Algorithm & Flowchart to find the sum of two numbers
Algorithm
Step-1 Start
Step-4 SUM = A + B
Step-6 Stop
OR
Algorithm
Step-1 Start
Step-3 SUM = A + B
Step-5 Stop
Algorithm & Flowchart to find Area and Perimeter of Circle
Start
R : Radius of Circle
AREA : Area of Circle
PERIMETER : Perimeter of Circle
Input Value of R
Algorithm
AREA = 22.0/7.0
Step-1 Start xRxR
Stop
Algorithm
Step-1 Start
Step-2 Input Sides of Triangle A,B,C
Step-3 S= (A + B + C)/ 2.0
Step-4 AREA = SQRT(S x (S-A) x (S-B) x(S-C))
Step-5 PERIMETER = S1 + S2 + S3
Step-6 Display AREA, PERIMETER
Step-7 Stop
Algorithm & Flowchart to find Compound Interest
P : Principle Amount
N : Time in Years
R : % Annual Rate of Interest
CI : Compound Interest
Algorithm
Step-1 Start
Step-3 CI = P(1+R/100)N - P
Step-4 Display CI
Step-6 Stop
L : Length of Rectangle
B : Breadth of Rectangle
AREA : Area of Rectangle
PERIMETER : Perimeter of Rectangle
Algorithm
Step-1 Start
Step-3 Area = L x B
Step-4 PERIMETER = 2 x ( L + B)
Step-6 Stop
Given below are the links to YouTube videos on Algorithms &
Flowcharts:
https://youtu.be/jwG5gaD3rU4
https://youtu.be/6qp8AiEPMYk
https://youtu.be/vOEN65nm4YU