Cpp - Statement continue statement

Introduction

Continue statement skips all remaining statements and begins a new iteration of the loop.

Demo

#include <iostream> 
   // w  w  w.  j  a va  2 s. c o m
int main() 
{ 
    int counter = 0; 
    int multiples = 0; 
   
    while (multiples < 19) 
    { 
           counter++; 
           if (counter % 15 != 0) 
                continue; 
           std::cout << counter << " "; 
           multiples++; 
    } 
 
    std::cout << "\n"; 
    return 0; 
}

Result