Simple While Loop
#include <stdafx.h>
#include <iostream>
using namespace std;
int main()
{
cout<< "Simple while loop example" <<endl;
int i=0;
while(i<5){
cout<< "Value= " << i << endl;
i++;
}
return 0;
}
Output:
Simple while loop example
Value= 0
Value= 1
Value= 2
Value= 3
Value= 4