This code is supposed to output one row per line but it is not. Does anyone know how to fix it?

Code:
#include <iostream> 
#include <iomanip>

using namespace std;


int main()
{
    int beta[10][5];

                                      
    
    int j, k;

    for (k = 0; k < 5; k++)
    {
        for (j = 0; j < 10; j++)
          {
            
            cout << beta[j][k] << " ";
          }
        cout << endl;
    }
}