# data mamgment problem (algorithm)

• 08-02-2009
cfan
data mamgment problem (algorithm)
Code:

```this is the original question: "there are stations all over the country which measure the temperature and the amount of rain fallen every day of the week. each station writes in a weekly report the data in a following way each line is(one line): day {1 char 1..7} date {8 chars dd/mm/yy} hour of measurement {5 chars HH:MM} daily_water_amount {3 chars } temprature  {2 chars}  in every day there could be limitless measurements. the lines are sorted by day and hour in ascending order. in the end of the week  the reports are passed to the central station for proccesing the average  temperature and  average rain amount. N is the evarage amount of water which fallen in that day in the country char X will be shown in the 15th place with respect to the start of the line. it creates a file in wich  every day in represented by two lines date {8 char } day {1 char} how many N times of char X ,one space the average amount of water (3 chars) M is the evarage amount of water which fallen in that day in the country char O will be shown in the 15th place with respect to the start of the line. the second line is how many M times of char O ,one space the average temperature (2 chars) char X will be shown in the 15th place with respect to the start of the line. write a function  void weather_report ( FILE * Station[ ], int stationNum, char * weekfile) in which stationNum is the number of stations and creates the total report with weekfile name```
there are so many files
i know that i should deal with only one
but this is so complicated
i dont know how do dela with it

which beats of info to put where?
in what way
??