Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that prompts the user to input and integer andthen outputs both

ID: 3614482 • Letter: W

Question

Write a program that prompts the user to input and integer andthen outputs both the individual digits of the number and the sumof the digits. For example, it should output the individual digitsof 3456 as 3 4 5 6, output the individual digitsof 8030 as 8 0 3 0, output the individualdigits of 2345526 as 2 3 4 5 5 2 6, output theindividual digits of 4000 as 4 0 0 0, and output theindividual digits of -2345 as 2 3 4 5. Write a program that prompts the user to input and integer andthen outputs both the individual digits of the number and the sumof the digits. For example, it should output the individual digitsof 3456 as 3 4 5 6, output the individual digitsof 8030 as 8 0 3 0, output the individualdigits of 2345526 as 2 3 4 5 5 2 6, output theindividual digits of 4000 as 4 0 0 0, and output theindividual digits of -2345 as 2 3 4 5.

Explanation / Answer

please rate - thanks with arrays # include #include using namespace std; int main() { int i,j,num,digit[10]={0},sum=0; coutnum; num=abs(num); cout