Q9: Your program should allow users to enter an integer numnber 'n', then it should display the sum of all the digits forming 'n'. Example: 12345 OUTPUT: 15 Press any key to continue

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter6: Looping
Section: Chapter Questions
Problem 3PE
icon
Related questions
Question
c programing
Q9:
Your program should allow users to enter an integer numnber 'n', then it should display the sum of
all the digits forming 'n'.
Example:
12345
OUTPUT:
15
Press any key to continue
Transcribed Image Text:Q9: Your program should allow users to enter an integer numnber 'n', then it should display the sum of all the digits forming 'n'. Example: 12345 OUTPUT: 15 Press any key to continue
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT