java

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.

  1. 👍
  2. 👎
  3. 👁
  1. 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.

    1. 👍
    2. 👎

Respond to this Question

First Name

Your Response

Similar Questions

  1. Java Programming

    I'm a beginner to Java and I need to know how to do the following: Write a program that will ask the user to enter the amount of a purchase. The program should then compute the state and county sales tax. Assume the state sales

  2. statistics

    the average number of years a person takes to complete a graduate degree program is 3. the standard deviation is 4 months. Assume the variable is normally distributed. If an individual enrolls in the program, find the probability

  3. Java

    write a java program to read a record name, age, and salary. Calculate the tax amount on the salary field display the new record.

  4. computer science

    I need help with my Java homework! Write a program that calculates a customer's monthly bill. It should ask the user to enter the letter of the package the customer has purchased (A, B, or C) and the number of hours that were

  1. java programming

    write a java program using arrays function for hotel bill calculation?

  2. c programming

    a student designed a program to accept the age of an employee and then compute the employees retirement year and display the same in a statement on the screen required. a) write out the pseudo-code for the program above b) write

  3. c programming

    write a program and create a flowchart or psuedocode that will ask the user for 3 grades. the program will calculate the average on those 3 grades. the program will display the 3 grades the average and the letter grade.

  4. algebra 1

    the deepest point in elevation in the indian ocean is the java trench, which is 25,344 feet below sea level. elevations below sea level are represented by negative numbers. can you help write the elevation of the Java Trench?

  1. MATH

    WRITE A SIMPLE BUT A COMPLETE FORTRAN PROGRAM TO COMPUTE THE AVERAGE OF SIX NUMBERS AND DISPLAY THE NUMBERS, SUM AND AVVERAGE. THE PROGRAM SHOULD TERMINATE WHEN ZERO IS ENTERED AS A NUMBER. THE PROGRAM SHOULD BE EDUCATIVE

  2. Programming

    Write a pseudocode program that asks the user for an integer between 1 and 12. The program is to calculate the times table for that number. So for example, if the user enters a 2, then the program has to calculate 2x1 and display

  3. Java Programming

    Question : Write a java program to find circumference and area of a circle. Your program should be fulfill following requirements.  Radius of the circle should be read in the main method of the program  Circumference and

  4. JAVA PROGRAMMING

    "POWERS" Compute the power of a number given the base and exponent. Do three versions of this program using a while loop, a do-while loop and a for-loop. Introduction Please help..i don't know how to input this in java...please

You can view more similar questions or ask a new question.