Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
11
Task/Least-common-multiple/BCPL/least-common-multiple.bcpl
Normal file
11
Task/Least-common-multiple/BCPL/least-common-multiple.bcpl
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
get "libhdr"
|
||||
|
||||
let lcm(m,n) =
|
||||
m=0 -> 0,
|
||||
n=0 -> 0,
|
||||
abs(m*n) / gcd(m,n)
|
||||
and gcd(m,n) =
|
||||
n=0 -> m,
|
||||
gcd(n, m rem n)
|
||||
|
||||
let start() be writef("%N*N", lcm(12, 18))
|
||||
Loading…
Add table
Add a link
Reference in a new issue