C++ Code from AP Computer Science Class (1999)