Problem 9, using rust