The program is an illustration of loops; Loops are used for repetition
The program written in Python, where comments are used to explain each line is as follows:
#This gets input for the number
n = int(input())
#This initializes the sum to 0
sumTotal = 0
#This iterates through the digits
for x in str(n):
#This adds each digit
sumTotal+=int(x)
#This prints each digit
print(x,end =' ')
#This prints a new line
print()
#This prints the total
print(sumTotal)
Read more about loops at:
https://brainly.com/question/24833629
#SPJ1