src/Convert-math.cpp
int Convert::getLcm(const vector<int>& numbers) {
	if (numbers.size() == 0) {
		return 1;
	}
	int output = numbers[0];
	for (int i=1; i<(int)numbers.size(); i++) {
		output = (output * numbers[i]) / getGcd(output, numbers[i]);
	}
	return output;
}
//////////////////////////////
//
// Convert::getLcm -- Return the Least Common Multiple of a list of numbers.
//
:getLcm -- Return the Least Common Multiple of a list of numbers.
: getLcm -- Return the Least Common Multiple of a list of numbers .
int Convert::getLcm(const vector<int>& numbers) {
	if (numbers.size() == 0) {
		return 1;
	}
	int output = numbers[0];
	for (int i=1; i<(int)numbers.size(); i++) {
		output = (output * numbers[i]) / getGcd(output, numbers[i]);
	}
	return output;
}
int Convert :: getLcm ( const vector < int > & numbers ) { if ( numbers . size ( ) == 0 ) { return 1 ; } int output = numbers [ 0 ] ; for ( int i = 1 ; i < ( int ) numbers . size ( ) ; i ++ ) { output = ( output * numbers [ i ] ) / getGcd ( output , numbers [ i ] ) ; } return output ; }
Convert::getLcm -- Return the Least Common Multiple of a list of numbers.
Convert :: getLcm -- Return the Least Common Multiple of a list of numbers .