Posted by **Anonymous** on Saturday, April 7, 2012 at 1:43am.

can anyone help me with this? I'm new to java! Write a program that will find the lowest common denominator of two numbers. The user will enter the two denominators, the program will output both the lowest common denominator and the multipliers required for each fraction. For example, if the user is trying to add 1/3 and 1/4, the input would be 3 and 4, the output should be: The lowest common denominator is 12.multiple 1/3 by 4/4 and 1/4 by 3/3 to convert the fractions.

- java -
**MathMate**, Sunday, April 8, 2012 at 8:14am
Yes, we will be pleased to help you.

For this problem, you will need to know how to find common denominators, which is basically the lowest common multiple (LCM) of the denominators.

To do this, there are to approaches.

The conventional approach is to factorize each denominator, and find the LCM by removing the common factors.

Graphically, it would be like:

24=2.2.2.3

56=2.2.2.7

So the LCM is 2.2.2.3.7=168, or

The highest common factor being 2.2.2=8, we can also find the LCM by

24*56/(2.2.2)=168

It is possible to implement this in computer programming, by successively dividing by potential factors, and keep track of the product of all common factors, which will become the HCF. The LCM will be the product of the two numbers divided by the HCF.

Algorithmetically, it is simpler to find the HCF by Euclid's division, but that's an optional implementation.

Write if you need further help.

## Answer this Question

## Related Questions

java - Write a program that will find the lowest common denominator of two ...

programming - Write a program which allows user to enter 10 student names and ...

programming - Having troube with java, i am not a regular programmer, if anybody...

java - Write a java application that finds the smallest of several integers. ...

java.please help - Write a Java program that prompts the user for a string. If ...

computer science /use java language - write the program that inputs a string ...

java programming - Your boss at Ruritania Weather Center (RWC) has asked you to ...

Java Programming - I'm new to Java and I'm not sure how to write the source code...

Computer Programming - Java Programming Question: basically want to keep the ...

java programming - write a java program using arrays function for hotel bill ...