Write a program that prompts the user to input an integer and then outputs both the individual digits of the number and the sum of the digits while explaining each step to the side. For example, it should output the individual digits of 3456 as 3 4 5 6, and output the individual digits of 8030 as 8 0 3 0.
Explanation / Answer
I am including 2 codes here..both of 'em work Code 1: #include using std::cout; using std::cin; using std::endl; int main() { int i; char ch[4]; cout