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

王林
Release: 2023-09-16 21:45:02
forward
1586 people have browsed it

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!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template