Improve tests
This commit is contained in:
parent
b0d934707b
commit
a1acefab0e
4 changed files with 21 additions and 2 deletions
11
test/fib_recursive.lox
Normal file
11
test/fib_recursive.lox
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
fun fib(n){
|
||||
if(n <= 1)
|
||||
return n;
|
||||
return fib(n - 2) + fib(n - 1);
|
||||
}
|
||||
|
||||
for(var i = 0; i < 10; i = i + 1){
|
||||
print fib(i);
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue