Important Notice:

Course Content
Building IoT Applications (Chapter-4) M4-R5.1
About Lesson

Arithmetic Operators

            An arithmetic operator performs mathematical operations such as addition, subtraction and multiplication on numerical values (constants and variables)

 

Operator

Name

Description

Example

+

Addition

Adds together two values

x + y

Subtraction

Subtracts one value from another

x – y

*

Multiplication

Multiplies two values

x * y

/

Division

Divides one value by another

x / y

%

Modulus

Returns the division remainder

x % y

++

Increment

Increases the value of a variable by 1

++x

– –

Decrement

Decreases the value of a variable by 1

–x

error: Content is protected !!