An algorithm is a sequence of well-defined failure of operations that describe the necessary course of action to solve the problem. Any problem can be solved by using an algorithm.
Before drawing up instructions in the algorithm variables are case-sensitive conditions of the problem. The simplest algorithm types: linear, cyclic and branched algorithms.
Each of them, by a finite number of operations, is moving from the input data to the desired result in the problem.
Read the original condition tasks. Think about her decision: whether there is a cyclicity in the problem. Perhaps, given the operation, the implementation of which is due to satisfaction of various conditions. Write down all of the known data and unknown quantities.
Any algorithm requires formal record. If you need to create a flow chart, use special items to refer to each operation generated instructions. This usually blocks rhombic and rectangular shapes coupled to the common tree.
Make a general algorithm for solving tasks. The first step in the algorithm, type variables indicating the known data and the resulting value. Assign variables known from the condition tasks value.
Refine algorithm. Shall describe in detail the condition tasks. Each step instructions should be written on a separate line. If necessary, set the loops or branching algorithm.
All actions in the manual steps performed with the set variables. If you must enter the auxiliary variables, include them further at the beginning of the algorithm.
Most of the original meaning tasks while solutions flow conditions insatisfaction of which one action is performed on the data, and without satisfaction - more. In this case we are talking about branching algorithm. Arrange its two branches of the tree-instructions.
If after passing the branching algorithmconditions of one of the branches is necessary to bring back the body of the algorithm, then a round robin. Clearly make sure that the instructions within the loop was not infinite and has a finite number of iterations.
Any workflow should lead to the final result, given in condition tasks. Upon receipt of the required quantity, complete the algorithm body and record the response.