public ICalculonType Execute(ref ControllerState cs) { Integer b = ((Integer)cs.stack.Pop()); Integer a = ((Integer)cs.stack.Pop()); return(a.GCF(b)); }
public static Integer LCM(this Integer a, Integer b) { return(a.Divide(a.GCF(b)).Multiply(b)); }