
Keith B. answered 09/22/19
Software Engineer and Math Geek
No, the break statement exits from just the immediate loop and only the immediate loop you're in.
If you find yourself deep within nested loops and absolutely must exit, there is one way to break out of it: the dreaded goto statement. The goto statement transfers control absolutely to the named label.
When I taught, I used to tell my students, "If you're code is operating a nuclear reactor and you discover that the water level is dangerously low, and you absolutely must exit NOW to do something about it, then yes, use a goto.