Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void main()
- {
- const int nn = 50;
- setlocale(LC_ALL, "");
- int a[nn][nn], i, j, s, k=0, n;
- cout << "Введите порядок матрицы:\n";
- cin >> n;
- cout << "Введите матрицу:\n";
- for (i = 0; i < n; i++)
- for (j = 0; j < n; j++)
- cin >> a[i][j];
- for (i = 0; i < n; i++)
- {
- s = 0;
- for (j = 0; j < n; j++) s += abs(a[i][j]);
- if (s > 1) ++k;
- }
- cout << "k=" << k << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment