编程语言
首页 > 编程语言> > 【C++学习】- Recursion(递归)

【C++学习】- Recursion(递归)

作者:互联网

Resurcion

The usual method is to make the recursive call part of an if statement.

Wtih luck or foresight, tesst eventually becomes false, and the chain of calls is broken.

void recurs(argumentlist) {
	statements1
	if (test)
		recurs(arguments)
	statements2
}

After going into five levels of recursion, the program then has to back out through the same five levels.

标签:tesst,program,false,递归,Recursion,C++,levels,five,recurs
来源: https://www.cnblogs.com/yidianling/p/15895913.html