mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-26 00:28:47 +00:00
return fixed for real, tests added
This commit is contained in:
parent
644c1b3086
commit
274bda6938
95 changed files with 870 additions and 14 deletions
17
regression/test075.expr
Normal file
17
regression/test075.expr
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
local x;
|
||||
|
||||
fun test (n, m) {
|
||||
local i, s;
|
||||
s := 0;
|
||||
for i := 0, i <= n, i := i + 1 do
|
||||
s := s + i;
|
||||
if s > m then return s fi
|
||||
od;
|
||||
|
||||
s
|
||||
}
|
||||
|
||||
x := read ();
|
||||
|
||||
write (test (10, 100));
|
||||
write (test (100, 10))
|
||||
Loading…
Add table
Add a link
Reference in a new issue