c code from harvard cs class problems