Algorithm and Flowchart: Examples

Programming

Algorithm:

In order to write computer programming without any logical error, it is recommended programmers prepare a rough writing showing the steps involved in the program this is called an algorithm. An algorithm presents step-by-step instruction required to solve any problem.

Flowchart:

Flowchart is a symbolic or diagrammatic representation of an algorithm. It uses several geometrical figures to represent the operations and arrows to show the direction of flow. Programmers often use it as a program-planning tool to solve a problem. It makes use of symbols which are connected among them to indicate the flow of information and processing. Flowchart are very helpful in writing program and explaining program to others.

Symbols in Flowcharts:

Flowcharts typically consist of various shapes, each representing a different element in the process:

flowchart start, stop

Start/Stop (Terminal): Represents the beginning and the end of the flowchart.

flowchart input, output

Input/Output: Represents the values to be given by the user and the results to be displayed.

flowchart processing

Processing: Represents the arithmetic operation to compute a value.

flowchart decision making

Checking/Decision making: Represents the logical checking to decide the flow sequence.

flowchart preparation

Preparation: As the names states, any process step that is a Preparation process flow step, such as a set-up operation.

flowchart connector

Connector: Represents the Continuity of the flowchart in another place / page.

flowchart arrows

Arrows: Arrows that indicate the direction of flow from one step to another.

Examples of flowcharts:

By visually breaking down a process into smaller steps and decision points, flowcharts help in understanding the logic of a process, identifying potential bottlenecks or inefficiencies, and facilitating communication and collaboration among team members.

Flowchart 1:

Draw a flowchart to add two numbers entered by user:

flowchart to add two numbers

Flowchart 2:

Find the largest among three different numbers entered by user:

flowchart to find largest

Flowchart 3:

Find all the roots of a quadratic equation ax2 + bx + c = 0:

flowchart to find largest

Flowchart 3:

Draw a flowchart to find the Fibonacci series till term ≤ 1000:

flowchart-of-fibonacci-sequence

To learn about the algorithm, you need to learn In-depth algorithm concepts.

What's Next?

We've now entered the finance section on this platform, where you can enhance your financial literacy.