Write a C++ fragment that displays the row and column subscripts of all occurrences of the value of variable target that are found in M ? N matrix matrix.
What will be an ideal response?
```
cout << "Target " << target << "is found in matrix elements:" << endl;
for ( int i = 0; i < M; ++i )
for ( int j = 0; j < N; ++j )
if ( matrix[i][j] == target )
cout << ";[" << i << "][" << j << "]" << endl;
```
Computer Science & Information Technology
You might also like to view...
Access rights that determine what changes an individual or group can make to the information on a SharePoint site are called ________
Fill in the blank(s) with correct word
Computer Science & Information Technology
You can display a color palette by clicking the _____________________ box arrow in the Background section in the Table Properties dialog box.
Fill in the blank(s) with the appropriate word(s).
Computer Science & Information Technology