Hassaan
09/29/2022, 9:22 AMKlitos Kyriacou
09/29/2022, 9:44 AMreadln().toInt()
.
However, scanner.nextInt()
can read multiple ints on the same line. If you want to support that, it gets a little bit more complicated. You can start with readln().split("\\s+".toRegex()).map(String::toInt)
(untested).Hassaan
09/29/2022, 9:50 AM