Kotlin Programming

Hands On No. 11 : To generate the multiplication table of a given number

Resources
Source Code

fun main() {
   
    
    val number = 7

    println("Multiplication table of $number:")
    generateMultiplicationTable(number)
}

fun generateMultiplicationTable(number: Int) {
    for (i in 1..10) {
        val result = number * i
        println("$number * $i = $result")
    }
}