Find the Sum of Digits of the Whole Number

Find the sum of digits of the whole number with and without recursion.

The sum of digits of the whole number without recursion

The program given below obtains the sum of digits of any whole number.

Get hands-on with 1400+ tech skills courses.