What I would do is first define a structure to hold your data. It seems the data on each line is a day, district, positives, negatives but I am not sure about the first field since it's not used. One possible arrangement is
struct Cases
{
int positives;
int negatives;
};
Then declare an array of them to use for each district. I would use a vector for this but I get the feeling you don't know about those yet. If you do then use one. If not then declare a size for this array also. Here is what that might look like :
const int CaseArraySize = 31;
typedef Cases MonthCases[ CaseArraySize ];
const int DistrictCount = 4;
MonthCases cases[ DistrictCount ] = { 0 };
Now you have an array of cases for each district over a month's time with one item per day. You can store district A's data in slot 0, district B's data in slot 1, etc... Assuming the first field is a day, it will be used as the index in each district's array. Days start at 1 but array indexes start at 0 so an offset of one will have to be applied to the day.
Now you have all the data you need defined. Next you need to read the file, line by line. For each line in the file you need to obtain the day, district, positive count, and negative count. I will NOT do this for you - you need to figure this out. There are lots of ways to do it and many sample of each on the internet. It involves parsing tokens so that is a helpful search phrase to use. Here is how you can save the data :
districtCases[ district ][ day - 1 ].positives = positiveCount;
districtCases[ district ][ day - 1 ].negatives = negativeCount;
Now that all your data is defined and the data from the file is being stored, your next task is to analyze it. You have the logic for determining the maximum value and you will need something similar to get the negative. You might also want to define a structure to store the statistics for each district. It seems you need a count of positives, count of negatives, minimum number, maximum number, and average so declare a structure that holds all of those values and any other items you will need. It could be called DistrictData. Then write a function to traverse the data array for each district and analyze its data. Here's what a prototype for that might look like :
void AnalyzeDistrictData( MonthCases cases[], DistrictData & distData )
{
}
and the logic to call it will look like this :
DistrictData data[ DistrictCount ] = { 0 };
for( int n = 0; n < DistrictCount; ++n )
{
AnalyzeDistrictData( cases[ n ], data[ n ] );
}
The last thing to do will be to output the data in format specified. This will be a matter of displaying the data you obtained in AnalyzeDistrictData for each district in a loop that will be similar to the previous loop.
These are the steps I go through all the time. I find that if you first define all of the data needed it makes your job much easier. Then you can define the functions you need to process all the data and write the logic to do the processing. This is your homework so I am not going to do any more than this. I hope you have enough hints to finish the work. I recommend that you give all of this stuff a try. If you get stuck then ask another question and be sure to show all the code you are working with. Good luck.