Question: Please Read, no copy paste I need help with a c++ program , I cannot use arrays, linked list only! I don't know how to

Please Read, no copy paste

I need help with a c++ program, I cannot use arrays, linked list only!

I don't know how to read the user input of a matrix, the input is not predefined please don't assign a "userInput[3][3] = {{1 2 3},{4 5 6},{7 8 9}};"

I need to read the user input, and check if that input is correct for a matrix with NxN dimensions if the input is not of a NxN matrix than print an Error

but if the input is a NxN matrix then I need to find the determinant.

I can only use linked list because this is an Sparse Matrix and I cannot assign memory to any zero values

Here is an example of what the user can input into the program, note its only separated by spaces and enter line

User Input Error example:

1 0 0

3 0 0

1 0

Output:

Error! Matrix is not NxN

-------------------------------------------------------------

User Input 1:

-1 0 0

0 -1 0

-1 0 1

Output 1:

The input is a 3x3 matrix, the determinant is 1

-------------------------------------------------------------

User Input 2:

1 0 1 0

1 0 0 0

0 3 0 0

0 0 0 1

Output 2:

The input is a 4x4 matrix, the determinant is 3

-------------------------------------------------------------

User Input 3:

1 0 0

0 1 0

1 0 1

Output 3:

The input is a 3x3 matrix, the determinant is 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!