I need to set up a loop that will pull a set of data from a text file for example, wet.txt In the text file will contain high and low temperature data, as well as rain accumulations for an unknown amount of days, For example:
low high rain
30 60 0.3
25 55 0
30 65 0
I feel like i'm making this too complicated, I feel like I can put this into just one loop but i'm not sure how. I believe I would be using a while loop because we don't how many days of data their would be.
The output should look like:
Days reported = 3
Min Temp = 25
Max Temp = 65
Avg Low = 28.3
Avg High = 60.0
Total rain = 0.3
Number of rainy days = 1