C++ examples for Statement:for
Demonstrate simple FOR loop
#include <iostream> using namespace std; int main()//from w w w .j a va 2s . c o m { int j; //define a loop variable for(j=0; j<15; j++) //loop from 0 to 14, cout << j * j << " "; //displaying the square of j cout << endl; return 0; }