Question
C program help... The user enters the file name F and a positive value of X. Read the size of the square matrix and the
C program help...
The user enters the file name F and a positive value of X. Read the size of the square matrix and the elements of the square matrix from the file F. The matrix must be at least 3x3 in size. Analyze the matrix as follows (see example): Add up how many matching elements in the i-th row and the i-th column are equal (i = 1 row and the column is colored in the example). Do the same for the main diagonal and the antidiagonal. Display those indexes where the sum of the equal elements is greater than X. Write the C program. Use at least three functions, one of which returns a substantive value.
Example: X = 2
Columns and rows:
i=0, element 2 (i) //does not display it
i=1, element 3(i)
i=2, element 3(i)
i=3, element 2(i) //does not display it
i=4, element 5(i)
Diagonals:
element 1 (i) //does not display it
5 0 2 3 4 1 2 3 3 0 5 5 U HWNA 3 W W PWN 1 3 1 3 7 2 7 1 4 5 3 2 9Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started