# java

posted by .

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 -

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.

## Similar Questions

1. ### Math

How do you add this? -5/6 + 1/2 -5/6 + 1/2= 8/6 I know to find the lowest common denominator,which is 6, but the numerator is larger than the denominator which is 8/6. How do I solve?
2. ### Math

How would I describe a step-by-step procedure for adding two fractions with different denominators?
3. ### algebra

find lowest common denominator with the given denominators, 13/15 - 11/20
4. ### programming

Having troube with java, i am not a regular programmer, if anybody can help me out writting this program: write a program that takes two numbers from the java console representing, respectively, an investment and an interest rate(you …
5. ### 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, …
6. ### java

Write a java application that finds the smallest of several integers. Prompt the user for the number of integers that will be input, then prompt the user for that number of integers. Evaluate the integers to determine the smallest …
7. ### programming

Write a program which allows user to enter 10 student names and scores for Java programming 1 and Java programming 2. Allow user to choose which course they want to enter the record for. Use the loop to ask input from user. The program …
8. ### java programming

the learner is asked to write a program using java with user input that caculate and displays, the number of months it will take the user to save an amount of money. the user must enter the
9. ### computer, science, java, software

Write a Java program to declare and store numbers from 1 to 10 in a single dimensional array and display the output in the following format. 1 2 3 4 5 6 7 8 9 10
10. ### Programming Java

I am learning Java in programming right now. I need to write a program that should have an output like this: The program says "Type ten names". Then ten names sould be typed a person. Then the program chooses a random name from the …

More Similar Questions