如何简化的馏分 [英] How to simplify a fraction
本文介绍了如何简化的馏分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想简化我的应用程序的一小部分。该部分是什么样子, 的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.
推荐答案
- 计算最大公约数x和y
- 的GCD划分两者
Euclid算法是一个简单的方法来计算GCD。
Euclid's algorithm is an easy way to compute the GCD.
这篇关于如何简化的馏分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文