Infogain Interview Question

Code Sum of digits?