Write a recursive function "sumDigits" in C++, that receives an integer as argument by reference and returns the sum of digits representing this integer. Also write a main function to test this function.
Example output of program should look like following.
Enter a nonnegative integer: 23
The sum of the digits of 23 is 5
Attached implementation 306905.cpp pauses after displaying the result back to ...
Solution also explains the execution of recursive function "sumDigits" with the help of an example.