Algorithm is a step-by-step process of solving problems. If it is written in a form that resembles an English sentence, it is called "pseudocode."
The algorithm must have the following five characteristics:
The algorithm for finding the average of three numbers is as follows:
The pictorial representation of an algorithm is called a flowchart.
The symbols used in the flow chart are as follows:
Name | Symbol | Purpose |
---|---|---|
Terminal |
![]() |
Start/Stop/Start/End |
Enter /Output |
Parallelogram |
Input/output of data |
Processing |
![]() |
Represents any processing to be performed |
Decision box |
![]() |
Determine the alternative path to follow |
Connector |
![]() |
For connecting flowcharts Different parts |
Flow |
![]() |
Connects two symbols, also represents the execution process |
Predefined procedures |
![]() |
Module (or) subroutine specified elsewhere |
Page Connector |
![]() |
Used to connect two different pages of the flowchart |
Loop symbol |
![]() |
Shows initialization, conditions, and increments of loop variables |
Documentation |
![]() |
Show preparation Printed data |
The following is a flow chart for finding the average of three numbers:
The above is the detailed content of An algorithm is a description of ordered steps for solving a problem. In C language, an algorithm is a series of instructions implemented programmatically. A flowchart is a tool that graphically represents an algorithm, using different symbols and arrows to represent different operations and processes.. For more information, please follow other related articles on the PHP Chinese website!