C Programming General Tech

Algorithm and Flowchart

Algorithm:- Formulation of an approach to solve a problem in simple and understandable language is called an algorithm.

  • Statements in algorithms clearly explain the action that is to be performed by that step.
  • The steps have to be short and precise.
  • Collection of these steps, helps solve the problem.

Two different individuals can write two different algorithms to achieve the same result.

Algorithm to add two numbers.
1. Accept two [a & b] values from the user.
2. Compute [c=a+b]
3. Display the sum[c].

Flowchart:- Pictorial representation of the approach to solving a problem, with use of standard set of symbols, is a Flow Chart.

As a picture speaks better than words, drawing a diagram will help the user understand the solution easily.
The Flow chart can also help the user to understand the correct flow of actions and steps to follow.

Flow chart uses a standard set of symbols.

  • Rectangles for processing
  • Diamond shapes for decision making
  • The symbols are accepted and understood uniformly by all the programmers in the world.
  • Connectors are used to link flow charts that are in multiple pages.
  • Any flow chart always has a START and STOP.

Conclusion:- Algorithms help achieve a task with the help of well-defined statements.
Algorithms can be pictorial or graphically presented by flow charts.For easy understanding of the depicted flow charts, a standards set of symbols is used across the industry.

Sequentially grouped set of instructions for performing a task is called a Program.


One thought on “Algorithm and Flowchart

Comments are closed.