Question #225599

A continue statement is used in an iteration control to skip the remaining statements in the loop and proceed with the next iteration of the loop


Expert's answer

#include <iostream>
using namespace std;


int main() {
  for (int i = 0; i < 15; i++) {
    if (i == 7) {
      break;
    }
    cout << i << "\n";
  } 
  return 0;
}

LATEST TUTORIALS
APPROVED BY CLIENTS