Write a program that prompts the user to input an integer & then outputs both the individual digits of the number & the sum of the digits. For example, the program should: output the individual digits of 3456 as 3 4 5 6 & the sum as 18, output the individ

computer science

Description

Write a program that prompts the user to input an integer & then outputs both the individual digits of the number & the sum of the digits. For example, the program should: output the individual digits of 3456 as 3 4 5 6 & the sum as 18, output the individual digits of 8030 as 8 0 3 0 & the sum as 11, output the individual digits of 2345526 as 2 3 4 5 5 2 6 & the sum as 27, output the individual digits of 4000 as 4 0 0 0 & the sum as 4, & output the individual digits of -2345 as 2 3 4 5 & the sum as 14. Submit your compiled Java code for this assignment, compress the .java file into a single .zip file.


Related Questions in computer science category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.