Skip to content

Instantly share code, notes, and snippets.

@creaaa
Created April 5, 2017 22:15
Show Gist options
  • Save creaaa/01791f262f0eeb0d30d44dfc70625311 to your computer and use it in GitHub Desktop.
Save creaaa/01791f262f0eeb0d30d44dfc70625311 to your computer and use it in GitHub Desktop.
フィボナッチ
var first = 0
var second = 1
func fib() {
for _ in 1...10 {
print(first)
let result = first + second
first = second
second = result
}
}
fib()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment