Write a program that displays the sum of the digits of any non-negative integer. Two program
runs are shown below:
Enter an integer: 145
Sum of digits is 10
Enter an integer: 8888
Sum of digits is 32
I can't figure out how to add them up. I'm probably not on the right track. Anything would be appreciated, thanks.