Exercise 3: Sum of Digits Using Recursion

This exercise requires you to use recursion to calculate the sum of digits of a number passed

We'll cover the following

Problem Statement

In this exercise you have to write a function DigitSum to find the sum of digits of a number using recursion.

Example

Input:

25 

Output:

7

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy