Simple For Loop
#include <stdafx.h>
#include <iostream>
using namespace std;
int main()
{
cout<< "Simple For Loop Example" << endl;
for (int i = 0; i < 5; i++)
{
cout<< "Value : " << i <<endl; /* Will display the value of i until the condition i<5 is true. */
}
return 0;
}
Output:
Simple For Loop Example
Value : 0
Value : 1
Value : 2
Value : 3
Value : 4