什么是c ++中的递归。 [英] what is recursion in c++.

查看:100
本文介绍了什么是c ++中的递归。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

.. plz定义它。

..plz define it.

推荐答案

2008年1月5日星期六20:17:17 +0100,在********** @ gmail.com

< at ** ********@gmail.com写道:
On Sat, 05 Jan 2008 20:17:17 +0100, at**********@gmail.com
<at**********@gmail.comwrote:

.plz定义它。
.plz define it.



RTFM!

Google还没死!


RTFM !
Google is not dead !


" at * *********@gmail.com" < at ********** @ gmail.comwrote in comp.lang.c ++:
"at**********@gmail.com" <at**********@gmail.comwrote in comp.lang.c++:

.plz定义它。
.plz define it.



主要是递归是函数调用自身的地方。类似于:


long unsigned Factorial(无符号const输入)

{

if(0 == input)return 1;


if(1 == input)返回输入;


返回输入* Factorial(输入 - 1);

}


-
$ b $bTomásóhéilidhe

Mainly "recursion" is where a function calls itself. Something like:

long unsigned Factorial(unsigned const input)
{
if (0 == input) return 1;

if (1 == input) return input;

return input * Factorial(input - 1);
}

--
Tomás ó héilidhe


On 2008-01-05 19 :17:17 +0000,在********** @ gmail.com

< at ********** @ gmail.comsaid :
On 2008-01-05 19:17:17 +0000, "at**********@gmail.com"
<at**********@gmail.comsaid:

.plz定义它。
.plz define it.

http://en.wikipedia.org/wiki/递归

http://en.wikipedia.org/wiki/Recursion


这篇关于什么是c ++中的递归。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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