M
mathon
hi,
i have the following recursive function:
Does anybody know what the result is for the input of 10? - the problem
is i do not exactly know how i should handle the +(2*n-1)...
matti
i have the following recursive function:
Code:
unsigned int sum_odds(unsigned int n)
{
if(n==1)
return 1;
else
return sum_odds(n-1)+(2*n -1);
}
Does anybody know what the result is for the input of 10? - the problem
is i do not exactly know how i should handle the +(2*n-1)...
matti