《递归执行原理.doc》由会员分享,可在线阅读,更多相关《递归执行原理.doc(3页珍藏版)》请在金锄头文库上搜索。
1、static long jieCheng(long n) n=3 long y; if (n = 0) y = 1; else y = n * jieCheng(n - 1); return y; static long jieCheng(long n) n=1 long y; if (n = 0) y = 1; else y = n * jieCheng(n - 1); return y; static long jieCheng(long n) n=2 long y; if (n = 0) y = 1; else y = n * jieCheng(n - 1); return y; sta
2、tic long jieCheng(long n) n=3 long y; if (n = 0) y = 1; else y = n * jieCheng(n - 1); return y; static long jieCheng(long n) n=4 long y; if (n = 0) y = 1; else y = n * jieCheng(n - 1); return y; static long jieCheng(long n) n=5 long y; if (n = 0) y = 1; else y = n * jieCheng(n - 1); return y; a = ji
3、eCheng(5);/* static long jieCheng(long n) long y = 1; for (int i=1; i=n; i+) y = y * i; return y; */ static long jieCheng(long n) long y; if (n = 0) y = 1; else y = n * jieCheng(n - 1); return y; static void Main(string args) long a; a = jieCheng(5); Console.WriteLine(a); Console.ReadLine(); static int sum(int x, int y) int k = x + y; return k; static void sayHello() Console.WriteLine(Hello, guys!);