write a program to Java to assign two fractional numbers and print their differences
Answers
Answered by
2
Explanation:
Algorithm to add two fractions
Find a common denominator by finding the LCM (Least Common Multiple) of the two denominators.
Change the fractions to have the same denominator and add both terms.
Reduce the final fraction obtained into its simpler form by dividing both numerator and denominator by there largest common factor.
Answered by
4
Answer:
Add two fraction a/b and c/d and print answer in simplest form.
Explanation:
Input: 1/2 + 3/2
Output: 2/1
Input: 1/3 + 3/9
Output: 2/3
Input: 1/5 + 3/15
Output: 2/5
Similar questions