Algorithm and Flowchart

Algorithm and Flowchart, this article (CBSESkillEducation) will give you everything you need to know about how to figure out the best way to organize your writing. It will help you figure out which content format is best for your story, how to write in a conversational tone, and what to do when you’re stuck.

Algorithm and Flowchart

What is Algorithm ?

An algorithm is a step-by-step process that provides a series of instructions that should be carried out in a particular order to get the desired outcome.

Calculations, data processing, reasoning, are all part of an algorithm. Natural languages, pseudo – code, and flowcharts, among other formats, can be used to present algorithms.

Advantages of Algorithm

1. It is an easy-to-understand step-by-step description of a solution to a particular problem.
2. An algorithm follows a predetermined path.
3. It is independent of any programming language, making it simple to understand even for those who are unfamiliar with programming.
4. Each step in an algorithm has its own logical sequence, making debugging simple.
5. Algorithms break down problems into smaller bits or processes, making it easier for programmers to transform them into actual programmes.

Disadvantages of Algorithm

It takes a long time to write an algorithm, hence it is time-consuming.
Algorithms make it harder to demonstrate branching and looping statements.

How to write an Algorithm

There are no clear guidelines for writing algorithms. We write algorithms in a sequential order. You can also write an algorithm in your own language, but you must follow the program excretion carefully.

Syntax for writing Algorithm-

Step 1 – Start (Reserve when you are starting algorithm)
Step 2 – Declare variable
Step 3 – Variable Input
Step 4 – Variable Process
Step 5 – Variable Output
Step 6 – End / Stop (Reserve when you are Ending algorithm)

Pseudocode and algorithm both are same

Pseudocode is basically an algorithm implemented using comments and explanatory text written in simple English. Because it lacks the syntax of any programming language, it cannot be compiled or understood by a computer.

How to write Algorithms in different statement


Write an algorithm to find the greater number between two numbers.

Step 1: Start.
Step 2: Take two inputs (a and b) from the user.
Step 3: If a is greater than b then go to step 4 otherwise go to step 5
Step 4: Print a greater than b
Step 5: Print b greater than a
Step 6: End

if-else Statement

Write an algorithm to find whether a number is odd or even.

Step 1: Start.
Step 2: Take input from the user.
Step 3: Check the condition. If remainder is zero go to step 4 else go to step 5
Step 4: Print a is even and go to step 6
Step 5: Print a is odd
Step 6: End

Switch Statement

Write an algorithm to calculate the area of a rectangle or circle or triangle by taking the user’s choice.

Step 1: Start
Step 2: Initialize variables
Step 3: Take input for choice and then for area variables from the user
Step 4: Case 1: Circle: 3.14*3.14*r
Case 2: Rectangle: ar=a*b
Case 3: Triangle: at=0.5*a*b
Step 5: Display output according to case
Step 6: Stop

Looping Statement

Write an algorithm to print the number from 1 to 20

Step 1: Start
Step 2: Initialize X as 0,
Step 3: Increment X by 1,
Step 4: Print X,
Step 5: If X is less than 20 then go back to step 2.
Step 5: End

Write an algorithm to print the number from 10 to 1

Step 1: Start
Step 2: Initialize X as 10,
Step 3: decrement X by 1,
Step 4: Print X,
Step 5: If X is greater than 1 then go back to step 2.
Step 5: End

What is Flowchart ?

A flowchart is a graphical or visual representation of an algorithm using various symbols, shapes, and arrows to explain a process or programme. While computers are comfortable with numbers, people require visual representations to fully comprehend and express information.
Flowcharts are thus used to deconstruct a process into smaller chunks and develop it using visual representations.

There are several Online flowchart making software available, you can also create a flowchart using pen and pencil. There are a variety of organizations that use flowchart for example architecture, engineering, technology, business, medicine, education. Some of the online flowchart creation software are –

Why to use flowchart

1. To have a better understanding of how a process works
2. To evaluate a process in order to improve it
3. To explain how a process works to others.
4. When improved communication between those working in the same process is required.

There are four main types of flowchart

a. System flowchart -System flowcharts show how data flows through a system and how decisions are made to regulate the processes. Data flow charts and system flow charts are very similar.

b. Document flowchart – A flowchart is a visual representation of a process, system, or computer algorithm. They’re frequently used in a variety of fields to document, analyze, plan, enhance, and convey often complex processes in clear, simple diagrams.

c. Program flowchart – A programme flowchart is a sort of flowchart that shows how a programme addresses a specific problem.

d. Data flowchart – A data flow diagram shows how information flows through a process or system. It shows data inputs, outputs, storage spots, and paths between each destination using predetermined symbols such as rectangles, circles, and arrows, as well as short text labels.

What are the common symbol used in flowchart

flow chart symbols

Flow Chart Syntax 

flow chart syntax

How to draw flowchart

Q. Draw a flowchart to find the sum of two numbers?

Draw a flowchart to find the sum of two numbers

Q. Draw a flowchart to print the number from 1 to 10?

Draw a flowchart to print the number from 1 to 10

Flowchart and Algorithm are used for

The flowchart and the algorithm are used to solve problems. The flowchart helps to visualize the steps needed to solve a problem and the algorithm is used to find the best possible solution. Both of these tools are useful for many different types of problems, such as programming problems and logic problems.

1 thought on “Algorithm and Flowchart”

Comments are closed.