TopcoderArchiveVisit Topcoder
Archive
Algorithm problem

LCD

Problem statement, definition, constraints, and public examples.

Problem Statement

In math, the Least Common Denominator (LCD) between two numbers is the lowest
number that will evenly divide each of those numbers. For example, the LCD of 4
and 18 is 36.
Your task is to create a class LCD containing a method Denominator, taking two
ints and returning the least common denominator of the two.
Here is the method signature:
public int Denominator (int a, int b);

Definition

Class:
LCD
Method:
Denominator
Parameters:
int, int
Returns:
int
Method signature:
int Denominator(int param0, int param1)
(be sure your method is public)

Constraints

    Examples

      No public sample cases were explicitly marked for this problem in the original data.

      Back to all problems