Simple Do While Loop
#include <stdafx.h>
#include <iostream>
using namespace std;
int main()
{
cout<< "Simple do while loop example" << endl;
int i=0;
do{
cout<< "Value = " << i << endl; /* Statements inside any do-while loop are executed atleast once */
i++;
}while(i<5);
return 0;
}
Output:
Simple do while loop example
Value = 0
Value = 1
Value = 2
Value = 3
Value = 4