programming C

// Problem Description
‘// You are working as an Engineer for a materials manufacturing research lab and have been asked
to provide an automated solution to analyse data.
‘// The data relates to a new material being developed. The data is a measure of strength recorded
every 100mm of the material and is stored in a file.
‘// Each line in the file represents a row of measurements on the material. Data is separated by a
comma (,).
‘// Determine the final-value for each row and column of the data.
‘// Create and display a final-value map that represents the value for each row and column as
follows:
‘// If the value for a cell in each row is less than the average for the row and column, display -1
‘// If the value for a cell in each row is greater than the average for the row and column display 1,
otherwise display 0
‘// Calculate and display the count for the values 1, 0 and -1 for each row and column
‘// Test the sheet using the following rules to determine if the sheet is rejected or accepted.
‘// Rule 1. If any count for a row or column is greater or equal to than 50% of the number of rows or
columns then that row or column is rejected.
‘// Report the number of times the patterns are detected.
‘// Where 50 or more of the patterns are identified the sheet of material is rejected.
‘// Otherwise the sheet is accepted.
‘// The manufacturing process samples 1 of every 10 sheets produced, therefore the analysis will be
undertaken as required and must be completed
‘// in a timely manner to enable the process to be stopped, recalculated, then restarted.