A do ... while Loop - C++ Statement

C++ examples for Statement:do while

Description

A do ... while Loop

Demo Code

#include <iostream> 
  
using namespace std; 
  
int main(int argc, const char * argv[]) 
{ 
        unsigned int array[10]; 
        unsigned int count = 0; 
      /*from  ww w  .  j a  va  2s . c o m*/
        do 
        { 
            array[count] = count * 2; 
            cout << "Loop Iteration: " << array[count++] << endl; 
        } while (count < 10); 
      
        return 0; 
}

Result


Related Tutorials