Mathematical operators (7 ):
+,-, *,/, %, ++, And ,--
1 · % is the remainder operator, for example: 3% 2 = 1 8% 3 = 2
2. ++ and -- are the auto-increment 1 and auto-increment 1 operators.
3. I ++ and I both add 1 operations. For example, I ++ and ++ I are equal to I = I + 1 (I = I ++ and I = ++ I have different meanings than I ++ and I + I, (it can be understood that the plus sign first adds the 1 operation and then the value assignment, and the plus sign first adds the value to the 1 operation. For example, int I = 6; I = ++ I; the result is 7, I = I ++; the result is 6 .))
Relational operators:
= ,! =, <,>, <=,> =
Logical operators (common and boolean operators ):
& (Logical and), | (logical or ),! (Non-logical)
&: True only when all conditions are met.
|: True if one condition is met.
! : The highest level in logical operators.
Conditional OPERATOR :? :
Int I;
String S = (relational operation )? (1) :( 2 );
(If the conditions are met, output within 1 bracket; if the conditions are not met, output within 2 brackets)
Computing priority [from top to bottom]
!
(Arithmetic operation level)
++, -- (Prefix)
*,/, %
+ ,-
(Relational operators)
<,>, <=,> =
= ,! =
(Logical operators)
&&
|
! : The highest level in logical operators.
Computing priority example
Int I = 5;
Int S = int. parse (console. Readline (); // The keyboard accepts integer S.
Bool B =! (S> 5) & (S> = (1 + 2*3-(I ++ )));
Bool B =! (S> 5) & (S> = (1 + 2*3-(-- I )));
Bool B =! (S> 5) & amp; S> = 1 + 2*3--- I;
Bool B =! (S> 5) & amp; S> = 1 + 2*3-(-- I)/2;
Operator _ and _ operator priority