Created
December 8, 2017 03:49
-
-
Save AntonisFK/65327eeadfda7c5edaa3fd91ab6296de to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func fib(until n: Int) -> Void { | |
var num1 = 0 | |
var num2 = 1 | |
for _ in 0...n { | |
let num = num1 + num2 | |
print(num) | |
num1 = num2 | |
num2 = num | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment