Program correctly checks for bad input and accepts and prints values for the first matrix