Kotlin, IntelliJ Idea, limitations in value of to Double

Viewed 22

is it possible in IntelliJ Idea to code restrictions in console? When I have simple line:

val height = readLine()?.toDouble()

I would like to limit the possible input format only to #.##, where "#" is a prime number.

0 Answers
Related