0
Matrix
can you help me. what program that can search a matrix
3 Respostas
+ 3
you can do one, with 2 loops (one for columns, other for rows..
It will look something like that:
int desiredNumber;
for(int i=0;i<matrix[0].length;i++){
for(int j=0;i<matrix[1].length;i++){
if (matrix[i;j0]==desiredNumber){
return true;}
}
}
return false;
0
do you means arrays
0
yes