The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
79 views
double foo(int n)

{

int i;

double sum;

if(n == 0)

{

return 1.0;

}

else

{ sum = 0.0;

for(i = 0; i < n; i++)

{

sum += foo(i);

}

return sum;

}

}

asked in Algorithms by Active (1.1k points) | 79 views

1 Answer

0 votes
answered by Active (1.5k points)

Related questions

+2 votes
3 answers
1
asked in Algorithms by admin Loyal (2.5k points) | 350 views
+2 votes
1 answer
2
asked in Algorithms by Kapil Veteran (50.8k points) | 196 views
+1 vote
2 answers
3


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

29,138 questions
36,959 answers
92,026 comments
34,803 users