+1 vote
in Class 11 by kratos

How can we input the values into a two-dimensional array?

1 Answer

+1 vote
by kratos
 
Best answer

int mat[3][5], row, col;

for (row = 0; row < 3; row++)

for (col = 0; col < 5; col++)

cin >> mat[row] [col];

...