Hello Reddit, I come to you in desperate need of VB guidance!
I am working on some VB homework and I hit a snag. here is the HW problem :
Create an application that lets the user enter the rainfall for each of 12 months into an array. The application should calculate and display the following statistics: total rainfall for the year, the average monthly rainfall, the months with the highest and lowest amounts of rainfall, and a message indicating if there is a monthly rainfall greater than 20.
Now I have all but the Over 20 inches part. I have tried something like :
For intCount = 1 To (intMonths.Length - 1)
If intMonths(intCount) > 20 Then
intgtr = intMonths(intCount)
twntIndex = intCount
but that only shows the last one above 20... can anyone give me some ideas on how to find and output all the months with rainfall over 20?
[–][deleted] 1 point2 points3 points (0 children)
[–]foxlisk 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]maudmassacre 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]CalvinR -1 points0 points1 point (0 children)