- Addition (
- Subtraction (
- Multiplication (
- Division (
- Remainder, or Modulo (
- Exponent (
If you are already familiar with these operations and how they work, skip to the last section (Priority of Execution of Operations) or proceed with this chapter.
Addition and Subtraction
Multiplication and Division
This operation returns the remainder of a division and is performed using the
This operation raises a number to a certain power. The first number is the base, and the second is the exponent to which it must be raised. It is performed using the
Priority of Execution of Operations
Each operation has its execution priority, and the sequence of execution depends on it.
If operations have the same priority, they will be executed from left to right.
You can use parentheses
( ) to modify the priority of execution:
()have the highest priority. Inner parentheses are evaluated first, followed by outer ones.
Everything was clear?