欧几里德的方法 [英] Euclid's Method

查看:101
本文介绍了欧几里德的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好专家


欧几里德的方法:


如果大于 v 那么 u v 的最大公约数是 v 的最大公约数之和uv


现在我的问题是,我如何应用这种方法来获得以下输入的正确答案:

输入:


分子:4

分母:6

结果必须是:


4/6 = 2/3


即使是一个简单的程序也可以。请帮忙。谢谢。

Hello experts

The Euclid''s Method:

If u is greater then v then the greatest common divisor of u and v is the sum as the greatest common divisor of v and u-v.

Now my question is, how can I apply this method in getting the right answer for the following inputs:

Inputs:

Numerator: 4
Denominator: 6

The result must be:

4/6 = 2/3

Even a simple program will do. Please help. Thanks.

推荐答案

那么,你有什么尝试?你的代码在哪里?我们不会为你做功课。
So, what have you tried? Where''s your code? We aren''''t going to do your homework for you.


这里是代码:

Here''s the code:

展开 | 选择 | Wrap | 行号


是的,所以我看到你所做的工作。哦等等,有些事情不在这里。看起来你是从以下网站获得的:这里


我们可以看到你完全缺乏兴趣和努力,而且,从我们的心态和经验来看,我们可以发现家庭作业问题并复制答案。我们不会花时间在论坛上做其他人的作业。


这也违反了论坛规则。这是明确的。其他论坛在此规则中可能更隐含。无论哪种方式,你都是靠自己。
Right, so I see the work you have done. Oh wait, something isn''t right here. It looks like you got it from: here.

We can see your utter lack of interest and effort, and moreover, from our mentality and experience, we can spot homework questions and copied answers. We don''t spend time on the forums doing other people''s homework.

It''s also against the forum rules. Here it''s explicit. Other forums may be more implicit in this rule. Either way, you''re on your own.


这篇关于欧几里德的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆