Update cachematrix.R

Added code for both functions (makeCacheMatrix and cachematrix).