C++ examples for Statement:for
Leave for loop initialization part empty
#include <iostream> using namespace std; int main()// ww w . ja va2 s . co m { int count; count = 2; // initializer outside the for statement for ( ; count <= 20; count = count + 2) cout << count << " "; return 0; }