|
On having developed any program, we use normally operators who serve to us to realize diverse operations that grant him a certain complexity grade to our programs, since, otherwise the program would always realize the same and therefore it would not be a useful program.
| Arithmetical operators |
| + |
It adds two values |
| - |
It reduces two values (or a value goes on to negative) |
| * |
It multiplies two values |
| / |
It divides two values |
| % |
I remain of dividing two values |
| ++ |
I increase in a unit |
| -- |
Decrease in a unit |
| Allocation operators |
| = |
It assigns to the right part the left value |
| += |
It realizes the sum of the right with the left and assigns it to the right |
| -= |
It realizes the subtraction of the right with the left and assigns it to the right |
| *= |
It realizes the multiplication of the right with the left and assigns it to the right |
| / = |
It realizes the division of the right with the left and assigns it to the right |
| %= |
The rest is obtained and it is assigned |
| .= |
Concatena the value of the left with the right and it assigns it to the right |
| Logical operators |
| ! |
Operator not or denial. If it was true a raisin to false and vice versa |
| and |
Operator Y, if both are real costs really |
| or |
Operator O, costs really if some of the two is real |
| xor |
Real if some of the two is true but never both |
| && |
True if both it are |
| || |
True if someone it is |
| Conditional operators |
| == |
He verifies if two numbers are equal |
| ! = |
He verifies if two numbers are different |
| > |
Major that, he is sick true in affirmative case |
| < |
Minor that, he is sick true in affirmative case |
| > = |
Major or equal |
| <= |
Minor or equal |
|