0

how to take inputs by space in kotlin ?

how to take inputs by space in kotlin ?

17th Jan 2023, 6:39 PM
mostafa nady
mostafa nady - avatar
5 Answers
+ 2
Without a code example, it's hard to understand what you want exactly (other than Tibor's answer).
18th Jan 2023, 1:14 AM
Ausgrindtube
Ausgrindtube - avatar
+ 1
I think you mean something like this: val words = readLine()!!.split(" ") println(words)
17th Jan 2023, 6:58 PM
Tibor Santa
Tibor Santa - avatar
+ 1
I mean to take inputs that: when the user entered the first value, he would press space not enter
17th Jan 2023, 7:35 PM
mostafa nady
mostafa nady - avatar
+ 1
Yes. Have you tried my suggestion? Please link your program for more detail.
17th Jan 2023, 7:37 PM
Tibor Santa
Tibor Santa - avatar
0
yes, I tried it but i mean another thing
17th Jan 2023, 7:39 PM
mostafa nady
mostafa nady - avatar