Answer the question
In order to leave comments, you need to log in
Swift Fibonacci what is wrong?
Good afternoon!
When you run this code, Terminated by signal 11 crashes, what's wrong?
PS just starting in SWIFT
import Foundation
func fibbonachi(_ n: Int...){
if n.count==0 {
print(1)
fibbonachi(0,1)
}
else {
if n[0]==144 {return;}
print(n[0]+n[1])
var left = n[0]
fibbonachi(n[0],left+n[1])
}
}
fibbonachi()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question