Loops / Loop Control statements: break and continu

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> using namespace std; auto main() -> int { for (int i = 0; i < 10; i++) { if (i == 4) break; // this will immediately exit our loop std::cout << i << '\n'; } }
Editor Settings
Theme
Key bindings
Full width
Lines