0
Arreglos (otra vez)
ÂżCĂłmo es posible obtener la entrada del usuario para un dato en un arreglo bidimensional?
2 Answers
+ 1
One example:
int a[FIRST_DIMENSION][SECOND_DIMENSION];
for (i=0; i<FIRST_DIMENSION; i++) {
cout << "Enter " << SECOND_DIMENSION << " values for row " << i << endl;
for (j=0; j<SECOND_DIMENSION; j++) {
cout << "Value " << j << ": ";
cin >> a[i][j];
}
}
But the approach depends on the task. For example, you may use a GUI grid.
0
Thank you!