Calculate square root of a number


I want to calculate the square root of a given number.


// Set the number
let n = 4.0

// Get the square root
let sq = sqrt(n)


Heard the news?

The Swift Cookbook for Swift 3 is at last here! For iBooks, Kindle and Paperback.
Hurry up - and Check it out! ;-)