Add the number digits with recursion

后端 未结 0 416
执笔经年
执笔经年 2020-12-06 00:59

I tried to add all the digits in a number but it only adds the first and the last digit. For example 1111 -> 1+1+1+1 = 4 but I got 2, 47879 -> 35

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