Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
440 B
0
Indexable
Never
#include <iostream>
using namespace std;

int main()
{
    int n, m, c = 0;
    cin >> n >> m;
    
    int array[10][10]{};
    
    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < m; j++)
        {
            array[i][j] = c;
            c++;
        }
    }
    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < m; j++)
        {
            cout << array[i][j] << ' ';
        }
        cout << endl;
    }
}