Implementation
Dart

Be concise.

Be useful.

All contributions dictatorially edited by webmasters to match personal tastes.

Please do not paste any copyright violating resource.

Please try to avoid dependencies to third-party libraries and frameworks.

Other implementations
import "math/big"
gcd.GCD(nil, nil, a, b)
x.Div(a, gcd).Mul(x, b)
from fractions import gcd
x = (a*b)//gcd(a, b)
extern crate num;

use num::Integer;
use num::bigint::BigInt;
let x = a.lcm(&b);
x = a.lcm(b)
defmodule BasicMath do
	def gcd(a, 0), do: a
	def gcd(0, b), do: b
	def gcd(a, b), do: gcd(b, rem(a,b))
	
	def lcm(0, 0), do: 0
	def lcm(a, b), do: (a*b)/gcd(a,b)
end
x = lcm a b
import std.numeric: gcd
uint x = (a * b) / gcd(a, b);