Final Assignment2 prog

Added the function to modify input