Dlaczego drukuję mi tablicę w jednym wierszu zamiast:
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
const int W = 3;
const int K = 5;
int losowaLiczba, x, y;
int tab[W][K];
srand (time(0));
for (x=0; x<W; x++){
for (y=0; y<K; y++){
tab[x][y] = (-99) + rand( )%(99+1-(-99));
}
}
for (x=0; x<W; x++){
for (y=0; y<K; y++){
cout << setw(5) << tab[x][y];
}
}