There are many numbers, all of them are distributed from 0 to 12. How to write a program on delphi-7 to identify a formula, an algorithm, a pattern in a sequence of numbers, using which you can find the remaining numbers that obey this pattern? Numbers are entered from the keyboard until the sequence of numbers is determined. And the following number is displayed in the text.
In the promised case - no way. Absolutely nothing. But you can try to guess the algorithm from the existing ones.
- metodo first. Suppose that the numbers obey a formula, for example, n * a% b (where the percentage is the absolute value). In the course of entering numbers we are trying to pick up the coefficients. If for some of the formulas it is possible - then found. The disadvantage - you need to keep the base of formulas.
- second method. Graphic. It is banal to build a graph according to the given numbers, along the X axis we postpone the sequence number. We look at the graph, with a certain skill, you can guess the dependence. Then pick up the formula purposefully.
- third method. The graph is plotted on a plane, using pairs of numbers, like x, y coordinates or triples of numbers, then the third number is the color of the point. We look at the result. Some, not very good generators, immediately visible "patterns". Based on this, you can guess the coordinates of the points.