Description: |
Below example shows how to find out sum of each digit in the given number using recursion logic. For example, if the number is 259, then the sum should be 2+5+9 = 16.
|
Code: | ||
|
Output: |
Sum is: 7 |
Description: |
Below example shows how to find out sum of each digit in the given number using recursion logic. For example, if the number is 259, then the sum should be 2+5+9 = 16.
|
Code: | ||
?
|
Output: |
Sum is: 7 |
No comments:
Post a Comment