syntax break; Description: break ends a loop immediately
#include <iostream> /* including standard library */ using namespace std; int main ( void ) { int i; i=0; while (1) { i++; if (i==42) { break; } } cout << "The answer is " << i <<; return 0; }
The answer is 42