Home  >  Article  >  Backend Development  >  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.

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.

王林
王林forward
2023-09-16 21:45:021448browse

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."

Characteristics of the algorithm

The algorithm must have the following five characteristics:

  • Input
  • Output
  • Finiteness
  • Clarity
  • Validity

Example

The algorithm for finding the average of three numbers is as follows:

  • Start
  • Read three numbers a, b, c
  • Calculate the sum =sum(a b c)
  • Calculate the average =sum/3
  • Print the average Value
  • End

Flowchart

The pictorial representation of an algorithm is called a flowchart.

The symbols used in the flow chart are as follows:

Name Symbol Purpose
Terminal 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.Oval Start/Stop/Start/End
Enter /Output

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.

Parallelogram

Input/output of data
Processing 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.Rectangle Represents any processing to be performed
Decision box 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. Diamond Determine the alternative path to follow
Connector 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.Circle For connecting flowcharts Different parts
Flow 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.Arrow Connects two symbols, also represents the execution process
Predefined procedures 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.Double-sided rectangle Module (or) subroutine specified elsewhere
Page Connector 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.Pentagon Used to connect two different pages of the flowchart
Loop symbol 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. Hexagon Shows initialization, conditions, and increments of loop variables
Documentation 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.Printout Show preparation Printed data

Example

The following is a flow chart for finding the average of three numbers:

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.

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!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete