Fixing exercise 1. It compiles and runs according to specification. TODO: Add improvements for user interface and variable matrix size.