A university practical assignment from 1999. Do not code like this!