What will be the output of the following pseudocode for input 4?
1. Int sum(int num)
2. {
3. If(num is not equal to 0)
4. return num+num*sum(num-1)
5. Else
6. return num
7.}
Answers
Answered by
4
Answer:
64 is the answer.
Explanation:
1+1*0=1
2+2*1=4
3+3*4=15
4+4*15=64
Similar questions
Computer Science,
4 months ago
Math,
4 months ago
English,
9 months ago
Physics,
1 year ago
Math,
1 year ago