The problem is that my logic doesn't account for when the water is above 100 after 24hrs the user gets a message box that tells them they have passed.
Shouldn't you show the message after the for loop(after 24 hours have passed)?
For n As Integer = 1 To 24 'Setting Up the Loop
Remainder = CInt(Gallons * LeakRate) - Time 'Math Calculation
Gallons = CInt(Gallons - Remainder) 'More Math
If Gallons <= 99 Then 'Displaying Message
MessageBox.Show("Fish died at " & n & " hours when the remaining gallons were " & Gallons, "Dead and Stinking Fish", MessageBoxButtons.OK
)
Exit Sub
End If
lstRemainingGallons.Items.Add("Hour # " & n & " - " & Gallons & "gallons")
Next
If Gallons > 100 Then 'Displaying Message
MessageBox.Show("Get out the BBQ! You made it!", "Fish Frying Time!")
End If