Instead of storing it as an int, store it as a string, an array of char.  Then, add the its digits using a loop.  Oh, and don't forget to use atoi before operatinf if you want to right.  atoi means alpha to integer, it converts your char type number to an int one

Hope this helps :)
p.s. If there is a part of my solution that you did not understand, please do not hesitate to contact me and I'll be more than glad to explain it to you thoroughly