Problems 7,8,9,10

Also added a Sieve of Eratosthenes to the library