What does the following program do? - C++ Statement

C++ examples for Statement:for

Description

What does the following program do?

Demo Code

#include <iostream>
using namespace std;
int main(int argc, const char *argv[]) {


  for (int i = 1; i <= 5; ++i)
  {/*from w  ww  .j  a va 2s. c om*/
    for (int j = 1; j <= 3; ++j)
    {
      for (int k = 1; k <= 4; ++k)
        std::cout << '*';

      std::cout << endl;
    } // end inner for 

    std::cout << endl;
  }

}

Result


Related Tutorials