Posts tagged product

Oct07

Problem 8

comments

data product string

This one really involves almost more string manipulation than number crunching. Notice how nicely we can get a substring using the brackets. Also notice how chars gives us each character in our substring as something we can enumerate. This means a simple Enumerable helper method to calculate the product (like previous problems did with sum) and the problem become almost a one liner…..

Continue reading »