#include using namespace std; int main(){ int array[4][4] = { {0, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}; try{ for( int i = 0 ; i < 4 ; i++ ){ for( int j = 0 ; j < 4 ; j++ ){ cout << "(" << i << "," << j << ")" << endl; if( array[i][j] == 1 ){ cout << "Found!" << endl; throw 0; } } } } catch(int err){ } return 0; }