Problem Description
Write a program to find the determinant of a matrix. For how to find a determinant of a matrix please see: https://www.mathsisfun.com/algebra/matrix-determinant.html. Here you can find a determinant calculator to help you check your work: https://www.symbolab.com/solver/matrix-determinant-calculator
Problem Details
The name of the file containing the matrix will be given on the command line
This name will always be valid
The structure of a matrix file is
Num_rows num_cols
row1_val1 row1_val2 row1_val3…
row2_val1 row2_val2 row2_val3…
...
The files will always be structured correctly
Examples of these files have been included in the starter code
The matrices will always be square, ie N X N
The values in the matrix are real numbers
Additional Requirements
You should always print your answer to 2 decimal places
You must use a struct to represent your matrix object
If you do not use a struct the TAs will manually deduct 50% from your score after the due date has passed
Your solution should consist of at least 3 source files
matrix.c
matrix.h
main.c
Hints
This problem is recursive
Make sure to only open the file in read ("r") mode. If you open it in read and write ("r+") mode or write ("w") mode you will get an error as you only have read permissions for the matrix files
You are free to write as many functions as you want, so take advantage of that fact and break the problem down into lots of steps
Example
In the following example, input has been underlined to help you tell it apart from what you should output. You don’t need to underline anything, it is just a visual aid for you.
Assume the file 3X3Matrix.txt had the following contents
3 3
1 2 3
4 5 6
7 8 9
./findDeterminant.out 3X3Matrix.txt
The determinant is 0.00.