I am new to c programming. Could someone help me to solve the following problem related to arrays and text file:
A company has a large number of text files. These files are organized as follows:
1. the first line contains a threshold value.
2. the second line specifies the number of rows in the matrix.
3. the third line specifies the number of columns in the matrix.
4. each remaining line is one row of the matrix.
1.3
5
3
1.1 1.9 1.4
0.9 1.8 1.1
1.8 1.6 0.4
0.6 0.2 1.7
0.4 1.4 0.3
Assume no. of rows <=20, no. of columns <= 15.
Write a program that asks the user to supply the name of an input file, reads the data from input file, and prints the following info:
1. The treshold value
2. The numbers of rows and columns in the matrix
3. For each column the number of values in that column that are greater than or equal to threshold value.
4.the average of elements in the matrix
Help would be highly appreciated.
A company has a large number of text files. These files are organized as follows:
1. the first line contains a threshold value.
2. the second line specifies the number of rows in the matrix.
3. the third line specifies the number of columns in the matrix.
4. each remaining line is one row of the matrix.
1.3
5
3
1.1 1.9 1.4
0.9 1.8 1.1
1.8 1.6 0.4
0.6 0.2 1.7
0.4 1.4 0.3
Assume no. of rows <=20, no. of columns <= 15.
Write a program that asks the user to supply the name of an input file, reads the data from input file, and prints the following info:
1. The treshold value
2. The numbers of rows and columns in the matrix
3. For each column the number of values in that column that are greater than or equal to threshold value.
4.the average of elements in the matrix
Help would be highly appreciated.