code to add digits of a number - written in 2 mins