What is an Algorithm and Flowchart in C Language




The algorithm is a step-by-step procedure that is helpful in solving a problem. If it is written in English-like sentences then, it is called PSEUDO CODE. It is a formula or a set of steps that solves a particular problem for a specified problem. Each step in the algorithm must be specified clearly.

A programming algorithm is a process or formula for solving a problem. It involves a sequence of specified actions that describe how to perform a task, which the computer executes consistently. An algorithm follows a procedure consisting of inputs and produces a result, known as the output.

Properties of an Algorithm

An algorithm must possess the following five properties ?

The Algorithm for finding the average of three numbers is as follows: It reads three numbers, calculates their average and sum, and then prints the average value. It involves basic arithmetic operations and simple input/output steps.

  • Start
  • Read 3 numbers a,b,c
  • Compute sum = a+b+c
  • Compute average = sum/3
  • Print average value
  • Stop

Diagrammatic Representation

A diagrammatic representation of an algorithm is called a flow chart. Flowcharts include inputs, outputs, sequence of actions, decision points, sequence of actions, and process measurements. Symbols used in the flowchart are mentioned below ?

Name Symbol Shape Purpose
Terminal Oval start/stop/begin/end
Input/output Parallelogram Input/output of data
Process Rectangle To represent a process
Decision box Diamond Decision operation that determines which of the alternative paths to be followed
Connector Circle Used to connect different parts of the flowchart
Flow Arrows Join 2 symbols and also represent flow of execution
Predefined process Double Sided Rectangle Module (or) subroutines specified elsewhere
Page connector Pentagon Used to connect flowcharts in 2 different pages
For loop symbol Hexagon 

shows initialization, condition, and incrementation of loop variable

Document Printout Shows the data that is ready for printout

Flow Chart

Given below is the flowchart for finding an average of three numbers ?


Updated on: 2025-01-24T16:17:59+05:30

29K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements