def f(m):
if m==0:
return(0)
else:
return(m+f(m-1))
Which one of the following is correct?
1)The function always terminates with f(n)=n(n+1)/2
2)The function always terminates with f(n)=factorial of n
3)The function terminates for non-negative n with f(n)=n(n+1)/2
4)The function terminates for non-negative n with f(n)=factorial of n
1
Expert's answer
2018-08-20T00:49:10-0400
Dear Pradnya, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order
Comments
Leave a comment