added lcm function
This commit is contained in:
parent
ce44657a98
commit
159feb0dac
20
code/gcd.txt
20
code/gcd.txt
@ -31,9 +31,23 @@ gto
|
||||
:gcd-ret
|
||||
$u
|
||||
ret
|
||||
:main
|
||||
4
|
||||
16
|
||||
:lcm
|
||||
=b
|
||||
=a
|
||||
$a
|
||||
$b
|
||||
>gcd
|
||||
fun
|
||||
=gcd
|
||||
$a
|
||||
$gcd
|
||||
div
|
||||
$b
|
||||
mul
|
||||
ret
|
||||
:main
|
||||
21
|
||||
6
|
||||
>lcm
|
||||
fun
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user