added function to get the digits from the output of a digits.c program