1. Take as input the given number in a variable, say N
2. Create another variable to store the sum of digits, say S and initialize it to 0
3. Add the value of (N%10) to S, i.e. S = S + (N%10)
4. Update N as, N = N/10
5. If N is greater than 0, go to step 2. Otherwise, go to step 6.
6. Output S, the required sum of digits.