Kotlin Program to Add Two Integers Number

In this program, You will learn how to add two numbers using class and object in Kotlin.
you’ll learn to store and add two integer numbers in Kotlin. After addition, the final sum is displayed on the screen.

Kotlin Program to Add Two Integers Number

Source Code

fun main(args: Array<String>) {

    val first: Int = 10
    val second: Int = 20

    val sum = first + second

    println("The sum is: $sum")
}

Output