Added more tests

This commit is contained in:
Eduard Urbach 2024-06-04 15:51:31 +02:00
parent ec20fd3d3a
commit b6400cd77e
Signed by: eduard
GPG key ID: 49226B848C78F6C8
5 changed files with 42 additions and 33 deletions

View file

@ -1,19 +0,0 @@
import sys
main() {
let f = fibonacci(11)
sys.exit(f)
}
fibonacci(n Int) -> Int {
mut b = 0
mut c = 1
for 0..n {
let a = b
b = c
c = a + b
}
return b
}