Project 9: Other Fraction Operations

Project 9: The variables 'num1', 'denom1', 'num2', 'denom2' have been initialized.  There is also a working method called gcf(a,b) that determines the greatest common factor of a, b.

num1 is the numerator of the first fraction (5 in the previous example)

denom1 is the denominator of the first fraction (7 in the previous example)

num2 is the numerator of the second fraction (2 in the previous example)

denom2 is the denominator of the second fraction (3 in the previous example)

gcf(10,15) returns 5.

gcf(20,36) returns 4.

Task: Appropriately assign the values for variables 'difNum', 'difDenom', 'prodNum', 'prodDenom', 'quoNum', 'quoDenom' which correspond to the numerator and denominator of the difference, product, and quotient of the given fractions (in simplified form).

**If your code works for 5 test cases in a row, you can enter your e-mail address.

Universal Computational Math Methods:

pow(5,2) returns 25.0

abs(-3.0) returns 3

sqrt(49.0) returns 7.0