# (Sum the digits in an integer) Write a program that reads an integer between 0 and # 1000 and adds all the digits in the integer. For example, if an integer is 932, the # sum of all its digits is 14 ...
Ask the user to enter a positive integer. Use a loop to calculate the factorial. Return and print the result. Goal: Write a function that takes an integer and returns the sum of its digits.