ARITHMETIC OPERATORS
- Arithmetic operators are mathematical functions such as +,-,/,* and %. Just like maths they all have a different use for example:
- Subtraction operator;
* Multiplication operator;
/ Division operator;
% Modulus operator (returns the remainder, e.g. 5 % 3 evaluates to 2 because 5 divided by 3 is 1, with 2 left over);
<, > for relational operators.
- But also, C++ uses other operators, like:
– decrement operator;
<=, >= for relational operators ≤, ≥
LOGIC OPERATORS
- Logical operators will return either true or false after a comparison operation
- They are used mostly in if statements and they have the following notation in C++:
Or = ||
Not = !