fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int i = 1;
  6.  
  7.  
  8. while(i++) {
  9. cout << "in loop: " << i << endl;
  10. break;
  11. }
  12.  
  13. cout << "after loop: " << i;
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
in loop: 2
after loop: 2