mirror of
https://github.com/ProgramSnail/Lama.git
synced 2026-01-03 12:38:19 +00:00
Included lama compilation in root's make regression target
This commit is contained in:
parent
52ef663986
commit
89536c67e0
3240 changed files with 14640 additions and 6 deletions
17
lama-compiler/regression/test040.lama
Normal file
17
lama-compiler/regression/test040.lama
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
var x;
|
||||
|
||||
fun test (n, m) {
|
||||
var i, s, continue = 1;
|
||||
s := 0;
|
||||
for i := 0, i <= n && continue, i := i + 1 do
|
||||
s := s + i;
|
||||
if s > m then continue := 0 fi
|
||||
od;
|
||||
|
||||
s
|
||||
}
|
||||
|
||||
x := read ();
|
||||
|
||||
write (test (10, 100));
|
||||
write (test (100, 10))
|
||||
Loading…
Add table
Add a link
Reference in a new issue