Program to perform addition operation in Kotlin?

All QuestionsCategory: KotlinProgram to perform addition operation in Kotlin?
chetan shidling asked 4 years ago

I need short information.

1 Answers
chetan shidling answered 4 years ago

Here is the program to perform the addition operation in Kotlin.
 
fun main(args:Array <String>){
var num1: Int = 3
var num2: Int = 9
var result = num1 + num2
println(“The addition of $num1 and $num2 is $result”)
}
 
Output:
 
The addition of 3 and 9 is 12