+ 5
Square Root in Swift
Since the Swift compiler in the PlayGround here, doesn't have sqrt() (..\Playground\:1:10: error: use of unresolved identifier 'sqrt') I wrote one myself (not that accurate, but will do for what I need now... But after testing it in Xcode, I transferred it to the PlayGround hare, it has errors I don't even know how to begin understanding... https://code.sololearn.com/cIcdrTfnQQwj/#swift Can anyone help please? TIA Ronen
2 ответов
+ 4
So you can't even import Foundation here...
But, what's important is that now it works!
I have a function that finds a square root of an Int, up to the 2nd decimal place!
+ 1
SL code playground is limited