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.
As programmers, we are often taught that there is one "right way" to sum the digits of an integer. You set up a loop, you modulo by 10 to get the last digit, you divide by 10 to shift right, and you ...