solving program(2)

I need a help in these 2 questions:

1)write a program that prompts the user to input an integer and then outputs both the individuals digits of the number and the sum of the digits
ex.3456 output as 3 4 5 6, 400 as 4 0 0, -2765 as 2 7 6 5


2)write a function, reverseDigit, that takes an integer as a parameter and returns the number with its digits reversed
ex.the value of reverseDidit(2345) is 5432, (5600) is 65, (-258) is -852
What is your problem regarding those questions?
You have told us the requirements for your homework, but not given us any questions to answer to help you complete it. Note: We are not here to do your homework for you.
You need a way to break up each digit of the given number.

Hint: 3000 = 3 * 1000, 400 = 4 * 100, etc.
Topic archived. No new replies allowed.