The basic programme. Lacks exception handling