program accepts a string and returns a sum

I have updated the program so that it accepts a string and returns a sum.