home
clear breadcrumbs
search
login
 
break
#include
using namespace std; int main() { // with break cout << "Break\n"; for (int i = 0; i < 10; i++) { if (i == 4) { // do something then break break; } cout << i << "\n"; } cout << "No Break\n"; // no break for (int i = 0; i < 10; i++) { if (i == 4) { //do something; } cout << i << "\n"; } }