C++ examples for Statement:for
Leave the for loop incremental part empty
#include <iostream> using namespace std; int main()/*w ww. j a v a2 s . com*/ { int count; count = 2; // initializer outside the for loop for ( ; count <= 20; ) { cout << count << " "; count = count + 2; // altering statement } return 0; }