Arithmetic operators ( +, -, , , % ) in C++

Arithmetic operators ( +, -, , , % )

The five arithmetical operations supported by the C++ language are:
+ addition
- subtraction
* multiplication
/ division
% modulo
Operations of addition, subtraction, multiplication and division literally correspond with their respective
mathematical operators. The only one that you might not be so used to see is modulo; whose operator is the
percentage sign (%). Modulo is the operation that gives the remainder of a division of two values. For example, if
we write:
a = 11 % 3;
the variable a will contain the value 2, since 2 is the remainder from dividing 11 between 3.


Learn More :