mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-24 15:48:47 +00:00
Tests in interpretation
This commit is contained in:
parent
b4f6f48e30
commit
44b8a96e34
9 changed files with 89 additions and 53 deletions
14
regression/test030.expr
Normal file
14
regression/test030.expr
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
fun fib (n) {
|
||||
if n <= 1
|
||||
then return 1
|
||||
else
|
||||
return fib (n-1) + fib (n-2)
|
||||
fi
|
||||
}
|
||||
|
||||
read (n);
|
||||
|
||||
for i := n, i >= 1, i := i-1 do
|
||||
write (i);
|
||||
write (fib (i))
|
||||
od
|
||||
Loading…
Add table
Add a link
Reference in a new issue