Code finished. Printed to console and gives correct answer. Done.