Finding the sum of the digits of a number

Given an integer "N", how to find the sum of the digits of the number "N". The number may have 'k' number of digits.



For example:
If the number is "123", the result should be 1 + 2 + 3 = 6
If the number is "826", the result should be 8 + 2 + 6 = 16

Implementation:



Output:

enter the no:
123
The sum of the digits of number entered is 6