Added a code for two functions
Merge https://github.com/vajol/ProgrammingAssignment2