mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 06:48:48 +00:00
14 lines
No EOL
205 B
Text
14 lines
No EOL
205 B
Text
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;
|
|
|
|
return s
|
|
}
|
|
|
|
x := read ();
|
|
|
|
write (test (10, 100));
|
|
write (test (100, 10)) |