There are many ways to skin this cat. Here's one:
int points = 0;
int goal = 100;
boolean finished = false;
while (goal <= 100 && !finished) {
for (int i = 0; i < goal; i++) {
if (points > 50) {
finished = true;
break;
}
points += i;
}
}
Update: Wow, did not know about breaking with labels. That seems like a better solution.