0

Someone help me to convert from string to integer in Kotlin

B

24th Jun 2022, 8:03 AM
Benny MG
Benny MG - avatar
6 ответов
+ 3
Please remove code link in post's tags and put Kotlin in, as the language relevant to the question. https://code.sololearn.com/W3uiji9X28C1/?ref=app
24th Jun 2022, 11:06 AM
Ipang
+ 2
var x="5" var num = Integer.parseInt(x) println(num)
24th Jun 2022, 8:16 AM
Chris Coder
Chris Coder - avatar
+ 1
Thank you guys. I appreciate it
25th Jun 2022, 1:40 AM
Benny MG
Benny MG - avatar
24th Jun 2022, 8:41 AM
Chris Coder
Chris Coder - avatar
0
The readline function is for user input. If you've already declared the variables, you don't have to redeclare them. Also, don't forget the ending curly bracket for the main function.
24th Jun 2022, 9:34 AM
Justice
Justice - avatar