zakładając, że mam tablice [x][y] to myślałem, że x to wiersze, a y to kolumny, jednak tutaj jest to na odwrót, może ktoś mi to wyjaśnić? :
#include <iostream>
#include <cstdlib>
#include <new>
using namespace std;
int main()
{
int aktualnaPlansza[3][3];
for(int i = 0; i < 3; ++i)
{
for(int j = 0; j < 3; j++)
{
aktualnaPlansza[i][j] = i+j;
}
}
string przerywnik = " -------------";
cout << endl << przerywnik << endl;
for (int i = 0; i < 3; i++)
{
cout << " " << i + 1 << " | "
<< aktualnaPlansza[0][i] << " | "
<< aktualnaPlansza[1][i] << " | "
<< aktualnaPlansza[2][i] << " |";
cout << endl << przerywnik << endl;
}
cout << " 1 | 2 | 3 " << endl << endl;
return 0;
}