Problem: digitsum

Write a program that adds the digits of a number and displays the result.

Sample Input:

80732

Sample Output:

20

Submit your Java source code (digitsum.java file):


Powered by ideone.com