Division has more than one operator, / and %.
The addition operator can operate on string as well as numeric operands.
The modulus operator cannot have a floating point operand.
The two division operators, / and %, cannot have zero as a second operand.
total + = 2
The result of 2 + 3 * 4 is 14, not 20, because multiplication has precedence over addition.
The result of the expression 8 / 2 * 4 is 16, not 1, because of associativity. Multiplication and division have equal precedence, so the operations are performed from left to right.
The result of the expression 10 / 4 is 2, not 2.5, because of integer division.
C++, unlike some other programming languages, does not have an exponent operator. Instead, you use the pow function, defined in the cmath standard library, to raise a number to a certain power.
An algorithm is a step-by-step logical procedure for solving a problem.