C++ examples for Statement:for
The for Loop to iterate as many times as necessary.
#include <iostream> using namespace std; int main(int argc, const char * argv[]) { for (unsigned int i=0; i<10; ++i) { /* w ww . jav a 2 s .com*/ cout << "Loop Iteration: " << i << endl; } return 0; }