我想简化我的应用程序的一小部分。该部分是什么样子, 的x / y,其中x和y是整数。 我想简化分数到其最简单的形式。 任何人都可以请给我提示如何做到这一点。 先谢谢了。
I want to simplify a fraction in my application. The fraction is like, x/y where x and y are integers. I want to simplify the fraction to its simplest form. Can anyone please give me hints how to do it. Thanks in advance.
Euclid算法是一个简单的方法来计算GCD。
Euclid's algorithm is an easy way to compute the GCD.