Carefully read the condition of the original tasks. Consider her decision: whether there is a cycle in the task. May contain operations, the implementation of which is due to the satisfaction of various conditions. Write down all the known data and the desired quantity.
Any algorithm requires formal entry. If you need to make a flowchart of the algorithm, use special items to refer to each transaction created by the user. As a rule, are blocks of rectangular and rhombic shapes connected to a common tree.
How to solve the <strong>tasks</strong> <b>algorithm</b>
Make the overall algorithm for solving the problem. In the first step, enter the algorithm variables, denoting the known data and the resulting values. Assign to variables known from the conditions of task significance.
Detail algorithm. Shall describe in detail the condition of the problem. Each step should be written on a separate line. If necessary, set the loops or branching of the algorithm.
All actions in the steps of the instructions perform the specified variables. If you want to enter additional variables, include them additionally in the beginning of the algorithm.
Often the meaning of the initial tasks in the decision process, derive the conditions under which satisfaction over the data is one thing, but dismissed another. In this case we are talking about the branching of the algorithm. Place the two branches of the tree-instructions.
If the branching algorithm after completing the terms of one of the branches must be brought back through the body of the algorithm, then a cyclic algorithm. Clearly see that the loop inside the user was not infinite and have a finite number of iterations.
Any sequence of actions should lead to the final result specified in the condition task. After receipt of required size, complete the body of the algorithm and record the resulting response.