“или оператор в C#” Ответ

логические операторы в c

Logical Operators: 
They are used to combine two or more conditions/constraints or to complement 
the evaluation of the original condition under consideration. They are 
described below: 
 

Logical AND operator: The ‘&&’ operator returns true when both the conditions 
under consideration are satisfied. Otherwise it returns false. For example, a
&& b returns true when both a and b are true (i.e. non-zero).

Logical OR operator: The ‘||’ operator returns true even if one (or both) of
the conditions under consideration is satisfied. Otherwise it returns false. 
For example, a || b returns true if one of a or b or both are true 
(i.e. non-zero). Of course, it returns true when both a and b are true.

Logical NOT operator: The ‘!’ operator returns true the condition in 
consideration is not satisfied. Otherwise it returns false. For example, 
!a returns true if a is false, i.e. when a=0.
Heckar

Логический оператор на языке C

#include<stdio.h>
int main(){
  A = 5;
  B = 10;
if((A == 5) && (B < 11)){
 printf(“Both conditions are ture”);
}

if(!(A==5)){
 printf(“A is not equal to 5”);
}

if((A>=3) ||(B<=9)){
 printf(“min any one condition is true”);
}

}
Energetic Echidna

Ответы похожие на “или оператор в C#”

Вопросы похожие на “или оператор в C#”

Больше похожих ответов на “или оператор в C#” по C#

Смотреть популярные ответы по языку

Смотреть другие языки программирования