You will create a program that is composed of five files. The program will have two functions, each with it’s own header file and source code (think .cpp and .hpp) and a main file to runeverything.
The first function is readMatrix(). It will have a pointer to a 2D array and an integer as parameters. The integer is the size of the square. It will prompt the user to fill a square matrix. For this lab the matrix will be 2×2 or 3×3.
The second function is determinant(). It will have 2 parameters, a 2D array and an integer, whichis the size of the square. It will return an integer value with is the determinant of the matrix. If you don’t remember or know what a determinant is remember mathsifun.com!
In the main file, you will create a program that uses readMatrix() to prompt the user to enter 4 or 9 values to fill the array, calculate the determinant using determinant(), and display both the array and the determinant to the user. The array should not be displayed in a single line.
Once your program is working and you have eliminated the bugs, create a makefile to build your program. You do not need a complicated makefile. You can have a single target that just includes what you typed into the command line for testing. Include a second target clean that removes extraneous files such as .o files or a.out.