如何加快函数“递归调用”的速度???
这是一个递归调用的例子,怎么样能使调用更快?请高手们多多指导!
#include<math.h>
#include<string.h>
#include<stdio.h>
age(int n)
{int c;
if(n==1) c=122020;
else c=age(n-1)+2;
return(c);
}
void main()
{
printf("%d\n",age(154962));
}
2008-01-01 22:17
2008-01-01 22:38
2008-01-01 22:41
2008-01-02 09:11
2008-01-02 09:24
2008-01-02 09:28
2008-01-02 10:23
2008-01-02 10:58