Sum them digits challenge *122 for Daily Programmer. Done in C.