write a function (recursive) that will calculate the sum of even numbers from 1 to n

前端 未结 0 1349
无人共我
无人共我 2020-11-27 19:08

I have to write a recursive function that will calculate the sum of even numbers from 1 to n. for example for n=input= 6 the expected output would be: 2+4

相关标签:
回答
  • 消灭零回复
提交回复
热议问题