Update cachematrix.R

Added the code for the assignment