Assignment 2 for CPT220 (Programming in C)