Kotlins sqrt in Sololearn

How can I compute sqrt of a number in Kotlin? Please provide a oneliner

5/16/2018 7:32:56 PM

Oma Falk

8 Answers

New Answer


I hope this helps you, Oma! https://code.sololearn.com/cQRY8iQAPJPY/?ref=app


Jay Matthews 😘😘😘😘😘


not needed to import java.lang.Math.* just see this same example https://code.sololearn.com/clUvmKv6JO8X/?ref=app


I'm just learning Kotlin myself. I just tried that. It didn't work. You have to use java.lang.Math.* to get it to work.


nitish kumar jha that means kotlin.lang is onboard right? do u know kotlin version on SL?


please mention Jay Mathew as a best answer I am just improve there code. and for kotlin question you can ask from John well(MOD)sir he can give you best answer.


nitish kumar jha there are many ways to say thank you and yes..John is very far with Kotlin


Jay Matthews one more question: I saw kotlin.lang.math . U use java library. It is a question of kotlin version I think. right which version is on SL?