fixed case of 0 for number of digits
solution to problem 38