Модуль: (C++) Conditional operator


Задача

1/17

Flow controls in programming

Теория

Algorithmic constructions

Do you want to learn how to create powerful, intelligent, versatile, and useful programs?

Then you need to learn the three forms of flow control. According to computer systems theory, a good programming language should provide three forms of flow control.
 
1. Sequencing.
A sequence is a step-by-step algorithm in which operators are executed in a strict order. All our previous programs represented some sequence of operators.

2. Selection. The algorithm can change the sequence of steps depending on the logical condition.
If a condition is satisfied, 
    then do an action, 
otherwise do another action. 
 
3. Iteration. The algorithm repeats some sequence of steps a given number of times, or as long as a logical condition is met.
 As long as the condition is met
     do action.

The use of various forms of flow control allows programs to make decisions based on external factors, such as user input or data received from another part of the program.

Задача

Recall the fairy tale "Goldilocks and the Three Bears".  What algorithmic construction can be found in this fairy tale?

1) Sequencing.
2) Selection.
3) Iteration.
4) This is a fairy tale, it has no algorithmic constructions.

Выберите правильный ответ, либо введите его в поле ввода

Комментарий учителя