Write a program that reads two fractions, adds them, and prints the result so that the numerator

Question:

Write a program that reads two fractions, adds them, and prints the result so that the numerator and denominator have no common factor. For example, when adding 3/4 and 5/6, the result is 19/12. Use helper functions for obtaining the numerator and denominator of strings such as "3/4", and for computing the greatest common divisor of two integers.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Java Concepts Late Objects

ISBN: 9781119186717

3rd Edition

Authors: Cay S. Horstmann

Question Posted: