0% found this document useful (0 votes)
7 views11 pages

Anawesha Mitra 18731722027.Docx

The document discusses the importance of algorithms and flowcharts in programming, emphasizing their roles in problem-solving and program development. It outlines the characteristics of algorithms, types of control structures, and provides guidelines on how to write algorithms and flowcharts, along with examples. The conclusion highlights the interdependence of algorithms and flowcharts in effectively communicating programming solutions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views11 pages

Anawesha Mitra 18731722027.Docx

The document discusses the importance of algorithms and flowcharts in programming, emphasizing their roles in problem-solving and program development. It outlines the characteristics of algorithms, types of control structures, and provides guidelines on how to write algorithms and flowcharts, along with examples. The conclusion highlights the interdependence of algorithms and flowcharts in effectively communicating programming solutions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Technical Report Writing for CA#2 Examination

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

Software mastermind uses various programming languages to produce programs. Before


writing a program, first needs to find a procedure for working the problem. The program
written without properpre-planning has advanced chances of errors. Algorithm and
flowchart are the important tools for learning programming. An algorithm is a step- by- step
analysis of the process, while a flowchart explains the way of a program in a graphical way.
Algorithm and flowcharts helps to clarify all the way for working the problem. For
newcomers, it's always recommended to first write algorithm and draw flowchart for
working a problem and also only write the program. newcomers find it delicate to write
algorithm and draw flowchart. The algorithm can vary from person to person to break a
particular problem. The primer will be useful for the scholars to learn algorithm and
flowchart. It includes basics of algorithm and flowchart along with number of
exemplifications. Software Click Maps by NCH( unlicensed interpretation) has been used to
draw all the flowcharts in the primer. The word “ algorithm ” relates to the name of the
mathematician Al- khowarizmi, which means a procedure or a fashion. Software mastermind
generally uses an algorithm for planning and working the problems. An algorithm is a
sequence of way to break a particular problem or algorithm is an ordered set of unequivocal
way that produces a result and terminates in a finite time.

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.

HOW TO WRITE ALGORITHMS


Step 1 Define your algorithms input numerous algorithms take in data to be reused,e.g. to
calculate the area of cube input may be the cube height and cube range.
Step 2 Define the variables Algorithm's variables allow you to use it for further than one
place. We can define two variables for cube height and cube range as HEIGHT and range(
or H & W). We should use meaningful variable namee.g. rather of using H & W use
HEIGHT and range as variable name.
Step 3 figure the algorithm's operations Use input variable for calculation purpose,e.g. to
find area of cube multiply the HEIGHT and range variable and store the value in new
variable( say) AREA. An algorithm's operations can take the form of multiple way and
indeed branch, depending on the value of the input variables.

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.

To draw a flowchart following standard symbols are use


Oval
Used to represent launch and end of flowchart Parallelogram Used for input and affair
operation
Cube
Used for computation operations and data- manipulations
Diamond
Decision timber. Used to represent the operation in which there are two/ three druthers ,
true and false etc
Arrows
Flow line Used to indicate the inflow of sense by connecting symbols
Circle
Page Connector

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:

Operators Meaning Example

+ Addition A+B

- Subtraction A-B

* Multiplication A*B

/ Division A/B

^ Power A^3 for A3

% Reminder A%B

Relational Operators:

Operator Meaning Example

< Less than A<B

<= Less than or equal to A<=B

= or == Equal to A=B

# or != Not equal to A#B or A!=B

> Greater than A>B

>= Greater than or equal to A>=B

6 | Page
Logical Operators

Operator Example Meaning

AND A<B AND B<C Result is True if both A<B


and B<C are true else false

OR A<B OR B<C Result is True if either A<B


or B<C are true else false

NOT NOT (A>B) Result is True A>B is false


else true

GO TO statement also called unconditional transfer of control statement is used to transfer


control of execution to another step/statement. . e.g. the statement GOTO n will transfer
control to step/statement n.
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-2 Input first numbers say A
Step-3 Input second number say B
Step-4 SUM = A + B
Step-5 Display SUM
Step-6 Stop
Or
Algorithm
Step-1 Start
Step-2 Input two numbers say A & B
Step-3 SUM = A + B
Step-4 Display SUM
Step-5 Stop

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 & Flowchart to convert temperature from Fahrenheit to Celsius


C : temperature in Celsius
F : temperature Fahrenheit
Algorithm
Step-1 Start
Step-2 Input temperature in Fahrenheit say F
Step-3 C = 5.0/9.0 (F - 32 )
Step-4 Display Temperature in Celsius C
Step-5 Stop

Algorithm & Flowchart to find Area and Perimeter of Square


L : Side Length of Square
AREA : Area of Square
PERIMETER : Perimeter of Square

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 & Flowchart to find Area and Perimeter of Circle


R : Radius of Circle
AREA : Area of Circle
PERIMETER : Perimeter of Circle

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

Algorithm & Flowchart to find Area & Perimeter of Triangle


A : First Side of Triangle
B : Second Side of Triangle
C : Third Side of Triangle
AREA : Area of Triangle
PERIMETER : Perimeter of Triangle

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 & 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-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

You might also like