enter code here
i'm begineer in kotlin n i want to print age program using if else. if am given a alphabet than the print sorry numeric value expected.
import java.util.*
//import javax.print.attribute.IntegerSyntax
fun main(agrs : Array<String>) {
//var value1 = 11.0fe is $age")
val input = Scanner(System.`in`)
println("enter your Age ")
val a = input.nextInt()
println("your age is : " + a)
Aucun commentaire:
Enregistrer un commentaire