In mathematics, an operator is a symbol that represents a mathematical operation. There are several types of operators, including arithmetic, comparison, logical, and assignment operators.
Arithmetic operators are used to perform mathematical operations such as addition, subtraction, multiplication, division, and modulus (remainder).
+
-
*
/
%
Comparison operators are used to compare two values and return a Boolean result (true or false).
==
!=
>
<
>=
<=
Logical operators are used to combine multiple conditions and return a Boolean result.
&&
||
!
Assignment operators are used to assign values to variables.
=
+=
-=
*=
/=