# Arithmetic Operators (Mathematical Operators) in Kotlin

## Arithmetic Operator Types

Kotlin has 5 Arithmetic Operators similar to Java. They are

• Subtraction operator (-)
• Multiplication operator (*)
• Division operator (/)
• Modulus operator (%)

Which is also called as Mathematical Operator

## Syntax

``````var variable_one = variable_two + variable_three

For example,

var sum = 1+2``````

### Subtraction Operator

``````var variable_one = variable_two - variable_three

For example,

var sub = 10-2``````

### Multiplication Operator

``````var variable_one = variable_two * variable_three

For example,

var mul = 10*2``````

### Division Operator

``````var variable_one = variable_two / variable_three

For example,

var div = 10/2``````

### Modulus Operator

``````var variable_one = variable_two % variable_three

For example,

var mod = 21%4``````

## Arithmetic Operator Example Program in Kotlin

``````//Arithmetic Operator Example Program in Kotlin
//Operator Kotlin Programs, Basic Kotlin Program

fun main(args: Array<String>) {
val num1 = 100;
val num2 = 5

//Subtraction
val subtraction = num1-num2
//Multiplication
val multiplication = num1*num2
//Division
val division = num1/num2
//Modulus
val modulus = num1%num2

``````Addition of 100 and 5 is : 105