Anawesha Mitra 18731722027.Docx
Anawesha Mitra 18731722027.Docx
Name of the Topic: The latest trends and innovation in algorithm and
flowcharting
Name of the paper: Programming for problem solving
Paper code: ESCS291
Name: Anawesha Mitra
University roll no: 18731722027
Stream: CSE(CYBER SECURITY)
Year: 1st
Semester: 2nd
1 | Page
The latest trends and
innovation in algorithm and
flowcharting
2 | Page
PREFACE
3 | Page
Algorithm has the following characteristics
• Input An algorithm may or may not bear input
• Affair Each algorithm is anticipated to produce at least one result
• Definiteness Each instruction must be clear and unequivocal.
• Finiteness If the instructions of an algorithm are executed, the algorithm should terminate
after finite number of way.
The algorithm and flowchart include following three types of control structures.
1. Sequence In the sequence structure, statements are placed one after the other and the
prosecution takes place starting from over to down.
2. raying( Selection) In branch control, there's a condition and according to a condition, a
decision of either TRUE or FALSE is achieved. In the case of TRUE, one of the two
branches is explored; but in the case of FALSE condition, the other volition is taken.
Generally, the ‘ IF- also ’ is used to represent branch control. Loop( Repetition) The Loop or
Repetition allows a statement( s) to be executed constantly grounded on certain circle
conditione.g. WHILE, FOR circles. Advantages of algorithm
• It's astep-wise representation of a result to a given problem, which makes it easy to
understand.
• An algorithm uses a definite procedure.
• It isn't dependent on any programming language, so it's easy to understand for anyone
indeed without programming knowledge.
• Every step in an algorithm has its own logical sequence so it's easy to remedy.
4 | Page
Step 4 Affair the results of your algorithm's operations In case of area of cube affair will be
the value stored in variableAREA.However, the algorithm would affair the value of 6, if the
input variables described a cube with a HEIGHT of 2 and a range of 3.
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 result to a
problem. It's another generally used programming tool. By looking at a Flowchartone can
understand the operations and sequence of operations performed in a system. Flowchart is
frequently considered as a design of a design used for working a specific problem.
Advantages of flowchart
• Flowchart is an excellent way of communicating the sense of a program.
• Easy and effective to dissect problem using flowchart.
• During program development cycle, the flowchart plays the part of a design, which
makes program development process easier.
• After successful development of a program, it needs nonstop timely conservation during
the course of its operation. The flowchart makes program or system conservation easier.
• It's easy to convert the flowchart into any programming language law. Flowchart is
diagrammatic/ Graphical representation of sequence of way to break a problem.
5 | Page
The language used to write algorithm is simple and analogous to day- to- day life language.
The variable names are used to store the values. The value store in variable can change in the
result way.
In addition some special symbols are used as below
Assignment Symbol( or =) is used to assign value to the variable. to assign value 5 to the
variable HEIGHT, statement is HEIGHT = 5 or HEIGHT = 5 The symbol ‘ = ’ is used in
utmost of the programming language as an assignment symbol, the same has been used in all
the algorithms and flowcharts in the primer. The statement C = A Bmeans 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:
+ Addition A+B
- Subtraction A-B
* Multiplication A*B
/ Division A/B
% Reminder A%B
Relational Operators:
= or == Equal to A=B
6 | Page
Logical Operators
7 | Page
Algorithm & Flowchart to convert temperature from Celsius to Fahrenheit
C : temperature in Celsius
F : temperature Fahrenheit
Algorithm
Step-1 Start
Step-2 Input temperature in Celsius say C
Step-3 F = (9.0/5.0 x C) + 32
Step-4 Display Temperature in Fahrenheit F
Step-5 Stop
Algorithm
Step-1 Start
Step-2 Input Side Length of Square say L
Step-3 Area = L x L
Step-4 PERIMETER = 4 x L
Step-5 Display AREA, PERIMETER
Step-6 Stop
8 | Page
Algorithm & Flowchart to find Area and Perimeter of Rectangle
L : Length of Rectangle
B : Breadth of Rectangle
AREA : Area of Rectangle
PERIMETER : Perimeter of Rectangle
Algorithm
Step-1 Start
Step-2 Input Side Length & Breadth say L, B
Step-3 Area = L x B
Step-4 PERIMETER = 2 x ( L + B)
Step-5 Display AREA, PERIMETER
Step-6 Stop
Algorithm
Step-1 Start
Step-2 Input Radius of Circle say R
Step-3 Area = 22.0/7.0 x R x R
Step-4 PERIMETER = 2 x 22.0/7.0 x R
Step-5 Display AREA, PERIMETER
Step-6 Stop
9 | Page
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 Simple Interest
P : Principle Amount
N : Time in Years
R : % Annual Rate of Interest
SI : Simple Interest
Algorithm
Step-1 Start
Step-2 Input value of P, N, R
Step-3 SI = (P x N x R)/100.0
Step-4 Display SI F
Step-6 Stop
Algorithm
Step-1 Start
Step-2 Input value of P, N, R C
Step-3 CI = P(1+R/100)N
-P
Step-4 Display CI
Step-6 Stop
10 | Page
CONCLUSION
Algorithms are the rules and sequences made to understand effects, and
flowchart is the diagrammatic representation of the same. Both are
interdependent in computer programming. A person will need a flowchart to
explain an algorithm more easily and make a flowchart.
11 | Page