sum the digits of an integer
Related code examples
Write a function digitsum that calculates the digit sum of an integer. The digit sum of an integer is the sum of all its digits.
JAVA Program than read an integer and calculate the sum of its digits and write the number of each digit of the sum in English
Write a program that asks the user to enter an integer and prints two integers, root and pwr, such that 0 < pwr < 6 and root**pwr is equal to the integer entered by the user. If no such pair of integers exists, it should print a message to that effect.