Do you want to learn how to create powerful, "intelligent", versatile and useful programs?
Then you need to learn the three main forms of program execution control. According to the theory of computer systems, a good programming language should provide the implementation of three forms of control over the process of program execution:
1 - SEQUENCE: Execution of sequential statements - we have already met with this in earlier courses. All our previous programs were some sequence of statements
2 - SELECT:
if such and such a case,
then do this
otherwise do that
3 - REPEAT:
WHILE
The program is becoming more "intelligent", and the second form - the CHOICE between different modes of action - greatly increases the efficiency of computers.
Let's start with a simple example.
You must enter two integers from the keyboard and determine the largest of them.
Explore this example.