Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- using namespace std;
- int main() {
- int size;
- cin>>size;
- int matrix[size][size];
- for (int x = 0; x < size; x++)
- for (int y = 0; y < size; y++) {
- cin>>matrix[x][y];
- }
- for (int x = 0; x < size; x++) {
- for (int y = 0; y < size; y++) {
- if (matrix[x][y]) {
- cout<<x+1<<" "<<y+1<<endl;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement