代码搜索:recursive
找到约 2,177 项符合「recursive」的源代码
代码结果 2,177
www.eeworm.com/read/403011/11524434
cpp recur.cpp
// recur.cpp -- use recursion
#include
void countdown(int n);
int main()
{
countdown(4); // call the recursive function
return 0;
}
void countdown(int n)
{
www.eeworm.com/read/403009/11524739
cpp recur.cpp
// recur.cpp -- use recursion
#include
void countdown(int n);
int main()
{
countdown(4); // call the recursive function
return 0;
}
void countdown(int n)
{
www.eeworm.com/read/158370/11622945
cpp 13i.cpp
#include
// Fact() Return the factorial of parameter n
// IN: n is a positive integer number
int Fact (int n)
{ int temp;
if (n
www.eeworm.com/read/158370/11623140
cpp 13ii.cpp
#include
// Fib() Returns the Fibonacci number corresponding to n
// IN: n is a positive integer
int Fib (int n)
{ int temp;
if (n < 2)
temp = 1; // trivial case
else
www.eeworm.com/read/347853/11631420
pro ch07ex04.pro
/*
Turbo Prolog 2.0 Chapter 7, Example Program 4
Copyright (c) 1986, 88 by Borland International, Inc
*/
/* Tail recursive program that never runs out of memory */
predicat
www.eeworm.com/read/347853/11631536
pro ch07ex03.pro
/*
Turbo Prolog 2.0 Chapter 7, Example Program 3
Copyright (c) 1986, 88 by Borland International, Inc
*/
/* Recursive program to compute factorials.
Ordinary recursion, no
www.eeworm.com/read/157454/11702595
cpp rsum.cpp
// recursive sum of n numbers
#include
template
T Rsum(T a[], int n)
{// Return sum of numbers a[0:n - 1].
if (n > 0)
return Rsum(a, n-1) + a[n-1];
return
www.eeworm.com/read/157453/11704192
cpp rsum.cpp
// recursive sum of n numbers
#include
template
T Rsum(T a[], int n)
{// Return sum of numbers a[0:n - 1].
if (n > 0)
return Rsum(a, n-1) + a[n-1];
return
www.eeworm.com/read/157453/11704536
cpp rknap.cpp
// dynamic programming recursive knapsack
#include
#include // has max()
int p[6] = {0, 6, 3, 5, 4, 6};
int w[6] = {0, 2, 2, 6, 5, 4};
int x[6];
int n = 5;
int c =
www.eeworm.com/read/346512/11740196
tig test17.tig
/* error: definition of recursive types is interrupted */
let
/* define a tree */
type tree ={key: int, children: treelist}
var d:int :=0
type treelist = {hd: tree, tl: treelist}
in
d
end