Matrix Determinant with Rational Entries

  1. In the previous exercise your CMatrix class can handle the addition of two matrices with rational entities. Your class should be able to calculate the determinant of a matrix with rational entities.
  2. Test your classes with the following main program, which is the same as the main program in an earlier exercise which calculate determinants:
    int main()
    {
        int n;
    
        cin >> n;
        CMatrix a(n,n);
        a.Read();
        cout << a.Det() << endl;
    
        return 0;
    } 

For the input
2
1/1 1/2
1/3 1/4  
The result should be
1/12  
For the input
2
1/4 1/2
1/4 1/2  
The output should be
0