Don't get into the habit of using break for your applications, it's kind of a hackey solution. Putting loops like this inside of their own functions from which they can return instead of "jumping" out of makes it much easier to follow the flow of data.
Also, you need to work on your program flow. This "if...else" should be encapsulated in another if statement like this:
And listen to shacktar the "else" condition is NOT EXECUTED when the "if" statement is true. If you are seeing evidence to the contrary I would guess there is something wrong with your "for loop" instead.
This should work. Assuming that 'a' 'b' and 'c' are all equal. Are you sure that the problem you are seeing isn't that both conditions do exaclty the same thing?