Move test scripts into test-scripts

This commit is contained in:
2025-01-08 13:29:40 +01:00
parent 3a857e8980
commit 45b5ba897b
11 changed files with 0 additions and 0 deletions

53
test-scripts/gcd Executable file
View File

@ -0,0 +1,53 @@
#!/usr/bin/env curly
>main
gto
:gcd
=v
=u
$u
$v
>gcd-loop
gge
$u
=t
$v
=u
$t
=v
:gcd-loop
$v
0
>gcd-ret
gle
$v
=t
$u
$v
mod
=v
$t
=u
>gcd-loop
gto
:gcd-ret
$u
ret
:lcm
=b
=a
$a
$a
$b
>gcd
fun
div
$b
mul
ret
:main
21
6
>lcm
fun
out
end