X1178: Recursive Add Digits C++

Write a recursive function called add_digits that will receive a positive number and returns the sum of each of digits. For example, calling add_digits(51); should return 6 since 5+1=6.

Make sure to use recursion (no loops)!

Your Answer:


Your feedback will appear here when you check your answer.