#include <stdio.h>
int loop(int a);
int main (void)
{
int a = 100;
int result;
result = loop(a);
printf("%d\n", result);
return 0;
}
int loop(int a)
{
if(a == 0 || a == 1)
return a;
else return loop(a - 2) + (a - 1)*(a - 1) - (a * a) ;
}
建议看看有关离散数学的书
[
本帖最后由 地狱无明火 于 2010-3-23 11:08 编辑 ]