Cpp - Statement continue statement

Introduction

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

Demo

#include <iostream> 
   //from  w  w  w.  j a va 2s .  co 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