Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,17 @@
|
|||
function gcdp( a as uinteger, b as uinteger ) as uinteger
|
||||
if b = 0 then return a
|
||||
return gcdp( b, a mod b )
|
||||
end function
|
||||
|
||||
function gcd(a as integer, b as integer) as uinteger
|
||||
return gcdp( abs(a), abs(b) )
|
||||
end function
|
||||
|
||||
function lcm(a as integer, b as integer) as uinteger
|
||||
return abs(a*b)/gcd(a,b)
|
||||
end function
|
||||
|
||||
print "lcm( 12, -18) = "; lcm(12, -18)
|
||||
print "lcm( 15, 12) = "; lcm(15, 12)
|
||||
print "lcm(-10, -14) = "; lcm(-10, -14)
|
||||
print "lcm( 0, 1) = "; lcm(0,1)
|
||||
Loading…
Add table
Add a link
Reference in a new issue