Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- ifstream fin("bac.txt");
- int main()
- {
- int mat[20][20], n, m;
- fin >> m >> n;
- for(int i = 0; i < n; i++)
- for(int j = 0; j < m; j++)
- fin >> mat[i][j];
- int numar = 0;
- for(int i = 0; i < n; i++)
- {
- for(int ii = 0; ii < n; ii++)
- {
- if(mat[i][0] == mat[ii][m - 1])
- {
- cout << mat[i][0] << " ";
- numar++;
- }
- }
- }
- if(numar == 0)
- cout << "nepolarizate";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement