please use a different way than the ones online becuase I didn`t understand them use a genuine way please thank you. Write a fraction calculator program that adds, subtracts, multiplies, and di- vides fractions. Your program should check for the division by 0, have and use the fol- lowing functions: (a) abs - returns the absolute value of a given integer. (b) min - returns the smallest of two positive integers. (c) gcd - returns the greatest common divisor of two positive integers. (d) reduce - reduces a given fraction. (e) flip - reduces a given fraction and flips the sign if the denominator is negative. (f) add - finds the reduced sum of a pair of given fractions. (g) subtract - finds the reduced difference of a pair of given fractions, by making the second fraction negative then using the add function. (h) multiply - finds the reduced product of a pair of given fractions. (i) divide - finds the reduced quotient of a pair of given fractions by inverting the second fraction then using the multiply function.
please use a different way than the ones online becuase I didn`t understand them use a genuine way please thank you.
Write a fraction calculator program that adds, subtracts, multiplies, and di-
vides fractions. Your program should check for the division by 0, have and use the fol-
lowing functions:
(a) abs - returns the absolute value of a given integer.
(b) min - returns the smallest of two positive integers.
(c) gcd - returns the greatest common divisor of two positive integers.
(d) reduce - reduces a given fraction.
(e) flip - reduces a given fraction and flips the sign if the denominator is negative.
(f) add - finds the reduced sum of a pair of given fractions.
(g) subtract - finds the reduced difference of a pair of given fractions, by making
the second fraction negative then using the add function.
(h) multiply - finds the reduced product of a pair of given fractions.
(i) divide - finds the reduced quotient of a pair of given fractions by inverting the
second fraction then using the multiply function.
Step by step
Solved in 2 steps with 2 images