Want to learn how to create powerful, "intelligent", versatile and useful programs?
Then you need to learn the three main forms of process control. According to the theory of computing systems, a good programming language should provide the implementation of three forms of control over the process of program execution:
1 - SEQUENCE: Executing sequential statements - we’ve already seen this in earlier courses. All our previous programs were a sequence of statements
2 - ВЫБОР:
if such and such a case,
then do it
else do that
3 - REITERATION:
WHILE (as long as such and such cases - do it)
The program is becoming more “intelligent,” and also greatly increases the efficiency of computers in the second form - the CHOICE between different methods of action.
Let's start with a simple example.
It is necessary to enter two real numbers from the keyboard and determine the largest of them.
Parse this example.