In programming, it is important not only knowledge of languages, but also an understanding of what is responsible for what. This is necessary for the possibility of successful teamwork, and as part of the article you will learn what a condition operator is, why it is needed, what features are there. Also, switching and branching of the code for which it is applied will be outlined in general terms.
What is a conditional statement?
So (or, otherwise, a conditional branch instruction) is called the construction of a programming language. It provides the execution of a command or their set. But this is possible only when the condition of truthfulness of a certain logical expression is met or an instruction from the user (equipment operator) has been received for implementation.
General Description of Application
, ( ) , . . , .
« », 1878. , , . . , , . . , , «». if. , , , , . . ? :
- , . () : if then end. , . , , end. . , - , , - .
- , . : if then 1 else 2 end. , , . , , – . .
- . :
if then
else if , then
else if then
else , end
, . . , ( ), – .
""
, , . "" . – =, <, > . :
if >=
then
:=Sqr(-)
else
write ( );
?
? , . , , . , , , , , . .
, . , , , . , , , .
, "" "". , , , . , , , . , , . , . , . .
, , - , , . ? case, swithc .
, , . .
- . , .
- . . «», . .
. .