Write a program that will find the sum of the digits of an integer.
Deliverables
- The user enters an integer
- The program finds the sum of the digits
- The program displays the sum with appropriate labels.
SAMPLE RUN (User entry is in RED)
User’s Entry
Enter an integer: 1239
Results
The sum of the digits is 15
Answer Preview
Solved by verified study co-pilot
All Study Co-Pilots are evaluated by Gotit Pro as an expert in their subject area.
Student review: (1 ratings)
17 out of 1 people found this solution helpful.