3 ms·
The best I can come up with is this: ANIMAL: if (isAnimal) { DOG: if (isDog) { POODLE: if (isPoodle) { if (color == gre
by VMG 13y ago
The best I can come up with is this:
ANIMAL: if (isAnimal) {
DOG: if (isDog) {
POODLE: if (isPoodle) {
if (color == green) {
break POODLE; // we don't want green poodles
}
if (age > 10) {
break DOG; // we don't want old dogs
}
if (weight > 20) {
break ANIMAL; // we don't want heavy animals
}
// more poodle conditions
}
// more dog conditions
}
// more animal conditions
}
- deleted 13y ago[deleted]