e549b4ced6
FossilOrigin-Name: dfed0de00b8d63672a882b79c4951cce0076007ef208c063b2f4e54fe9bd08f8
9 lines
125 B
Forth
9 lines
125 B
Forth
# example|LeastCommonMultiple
|
|
|
|
~~~
|
|
:gcd (ab-n)
|
|
[ tuck mod dup ] while drop ;
|
|
|
|
:lcm (ab-n)
|
|
dup-pair gcd [ * ] dip / ;
|
|
~~~
|