Code from a course in Imperative Programming