I was just assigned this program too, but when I use the code provided placed into the code seen in the sample here:
private int gcd (int num1, int num2)
{
while (num1 != num2)
if (num1 > num2)
num1 = num1 - num2;
else
num2 = num2 - num1;
return num1;
}
public int compareTo(Objec t obj)...
Leave a comment: