Question: For this exercise create a new version of the rainfall examples in this chapter. Your chapter 0 9 folder contains rainfall - report.php and rainfall

For this exercise create a new version of the rainfall examples in this chapter. Your chapter09 folder contains rainfall-report.php and rainfall2007.txt. This new version should use a loop to read the monthly rainfall from the rainfall2007.txt file, accumulate the total rainfall for the first 3 and last 3 months of the year (6 months altogether), and also display the name of the month and monthly rainfall for each of these 6 months. You don't need to use a table although you can if youd like to. The result should be something like this:
JAN: 3.21
FEB: 3.61
MAR: 2.84
OCT: 0.52
NOV: 2.03
DEC: 2.20
Total Rainfall for these months: 14.41 inches

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!