1. you don't need that while loop that starts on line 5 so just delete it2.
2. The for loop sould cout from 0 to < size, not <= size-1. If the value of size is 5, then you want it to count 0, 1, 2, 3 and 4.
3. Use a do loop to verify the value of rainfall >= 0, something like this
do {
ask question
input value of rainfall
} while( rainfall < 0);
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343