In a loop, continue will advance immediately to the next step through the loop. A continue statement causes a jump to the loop-continuation portion of the smallest enclosing iteration statement; that is, to the end of the loop body. A break statement terminates execution of the smallest enclosing switch or iteration statement. int x = 0; Example for continue statement int x = 0; so in the continue one it will continue the for loop when x hits 5 and will display 10 after the loop is done but in the break one it will stop right away and then go to the cout<<x. Remember, continue statements must be inside a loop; otherwise, a compiler will produce the error. break statements must be used inside either a loop or switch statement. |