Name: Achmad Fahry Baihaki
NIM: 2206065110100
Institute: Maulana Malik Ibrahim Islamic State University of Malang
Departement: Computer Science
Lecturer: Prof. Dr. Suhartono, M.Kom


Arithmetic operators is used to solve mathematical problems like addition, substraction, multiplication etc.

There are 7 types of arithmetic operators in R programming language, including:

1. Addition (+), for sum operation. Example:
9 + 99 + 999
## [1] 1107
2. Substraction (-), for substract operation. Example:
999 - 99 - 9
## [1] 891
3. Multiplication (*), for multiply operation. Example:
99 * 10
## [1] 990
4. Division (/), for divide operation. Example:
990 / 10
## [1] 99
5. Exponentiation (^), for appointment operation. Example:
9 ^ 2
## [1] 81
6. Modulo (%%), to find the remainder after dividing one number by another. Example:
9 %% 7
## [1] 2
7. Integer (%/%), to find the integer results of division only and without the remainder. Example:
9 %/% 7
## [1] 1

In computer programming language (including R), uses “precedence operators” in the calculation process.

The precedence of operators determines which operator is executed first if there is more than one operator in an expression. Example:

1 + 1 * 0
## [1] 1

The result will be different if we give paranthesis on the expression. Example:

(1 + 1) * 0
## [1] 0


That’s it for today’s article.