Programming assignment 2

Added comments
Added code in function prototypes