Program 3 completed, but not fully tested.