Question: C program only not C++! Write the C program. Use at least three functions, one of which returns a substantive value. The user enters the

C program only not C++!

Write the C program. Use at least three functions, one of which returns a substantive value.

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.

matrix.txt

5

0 1 2 3 4

3 2 3 0 5

7 1 3 7 2

4 5 3 2 9

Example: X = 2

C program only not C++! Write the C program. Use at least

Columns and rows: i = 0, 2 element(s) // does not display it i = 1, 3 element(s) i = 2, 3 element(s) i = 3, 2 element(s) // does not display it i = 4, 5 element(s) Diagonals: 1 element(s) // do 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 9

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!