请帮助我问题答案 [英] please help me the question answer

查看:118
本文介绍了请帮助我问题答案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

两个整数的最大公约数(GCD)是将两个数均分的最大整数.写入方法GCD,该方法返回两个整数的最大公约数.该应用程序从用户读取值并显示结果

The greatest common divisor (GCD) of two integers is the largest integer that evenly divides each of the two numbers. Write method GCD that returns the greatest common divisor of two integers. The application reads values from the user and displays the result

推荐答案

请您自己努力,甚至还没有将文本更改为家庭作业.

这不尊重所有在这里捐赠时间的人,有真正问题的人和自己.
Please make an effort yourself, you haven''t even changed the text to your homework assignment.

This is disrespectful to all the people donating their time here, those with genuine problems and yourself.


我们不做您的作业:这是有原因的.在这里,您可以考虑自己被告知的内容,并尝试理解它.也可以在那里帮助您的导师识别您的弱点,并将更多的注意力放在补救措施上.

老实说,这并不困难.我可以想到两种半的方法(一半是因为一种方法可以迭代或递归地完成-递归地,它只有五行代码,一个是函数头,另外两行是大括号)

您为什么不自己尝试呢?您可能会发现它比您想象的要容易...
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

And let''s be honest, it isn''t difficult. I can think of two-and-a-half ways to do it (the half is because one method can be done iteratively or recursively - recursively, it is only five lines of code, and one is a function header and two more are just curly brackets)

Why don''t you try it yourself? You might find it is easier than you think...


正如Mehdi和Griff正确建议的那样,自己动手做自己的家".

从此开始.
http://en.wikipedia.org/wiki/Greatest_common_divisor
As rightly advised by Mehdi and Griff, Do your Home work yourself.

Begin with this.
http://en.wikipedia.org/wiki/Greatest_common_divisor


这篇关于请帮助我问题答案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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