Formulary

 Math and Physics Calculators

| Start: Formulary | Imprint & Privacy


 
Anzeige



Calculate the Least Common Multiple (lcm)


Algorithm:
function gcd(m,n)
{
    if (n==0)
        return m;
    else
        return gcd(n, m%n);
}
function lcm(m,n)
{
    o = gcd(m,n);
    p = (m * n) / o;
    return p;
}
a:
b:
lcm (a,b):

Please enter a and b, the lcm will be calculated.



Formulary and calculators math and physics.
© jumk.de Webprojects | German: Formelsammlung Mathe & Physik



Anzeige