add solution to problem 3
Merge pull request #4 from walkermalling/try3

add solution to problem 3