hello
At first I apologize for my bad English language
Because of this I will explain the required by image
http://a.up-00.com/2017/12/151473658532421.jpg
Printable View
hello
At first I apologize for my bad English language
Because of this I will explain the required by image
http://a.up-00.com/2017/12/151473658532421.jpg
There's more than one way to skin this cat...
You could find all the prime factors of both the numerator and denominator and eliminate any factors they have in common. In your example. the prime factors of 33 are 3, 11 and the prime factors of 9 are 3, 3. Since the numerator and denominator both contain a 3, you eliminate that number (i.e. divide numerator and denominator by 3) leaving 11 / 3. Here's an algorithm to find the prime factors: https://www.geeksforgeeks.org/print-...a-given-number
Another way would be to find the GCD (greatest common divisor) of the numerator and denominator and then divide them both by the GCD. You can use Euclid's algorithm for this: https://en.wikipedia.org/wiki/Euclidean_algorithm