B. Write a recursive function for printing sum of first 20 numbers.
Answers
Answered by
0
Input : 3
Output : 6
Explanation : 1 + 2 + 3 = 6
Input : 5
Output : 15
Explanation : 1 + 2 + 3 + 4 + 5 = 15
Answered by
2
Answer:
- input: 3
- output: 6
1+2+3 = 6
- input: 5
- output: 15
1+2+3+4+5 = 15
Similar questions