Program 2 for CMPS 101