+ 3
Write a program in kotlin to check the input char is vowel or consonant using when condition
Values are input by the user
7 Antworten
+ 3
Please show us your attempt.
+ 3
fun main(args: Array<String>) {
var ch= readLine()!!toChararray();
when(ch)
'a','e','i','o','u' ->println ("char is vowel")
else-> println("Char is consonant")
}
+ 3
I don't speak Kotlin myself, but I hope someone will help you soon. :)
+ 2
Echo Echo
Why you use [0] tell me
+ 2
Echo Echo
Can we directly read char values in this program without array
+ 1
Echo Echo
Thank you so much for your help
I was in trouble about this kind of error and i didn't find any help to get me out from error in this program.
Thank you so much again...
+ 1
Echo Echo
Actually I tried yet but I didn't get this on google.