I'm working on a homework assignment. This is the exercise:
"Write a program that prompts the user to input an integer and then outputs both the individual digits of the number and the sum of the digits. For example, it should output the individual digits of 3456 as 3 4 5 6."
I am able to have the program output the sum of the digits, but I cannot seem to find out how to separate the digits as demonstrated.