C++ for statement create nested for loop

Description

C++ for statement create nested for loop

#include <iostream>

using namespace std;

int main()/*ww  w. j  ava  2 s.  com*/
{
    for (int x = 1; x <= 10; x++)
    {
        cout << "Products of " << x <<endl;
        for (int y = 1; y <= 10; y++)
        {
            cout << x * y << endl;
        }
        cout << endl;
    }

    return 0;
}



PreviousNext

Related