Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include <algorithm>
- #include <cmath>
- using namespace std;
- int main()
- {
- int n, c;
- cin >> n;
- int b[101][101];
- int *a = new int[n];
- for (int i = 0; i < n; i++) {
- c = 0;
- for (int j = 0; j < n; j++) {
- cin >> b[i][j];
- if (b[i][j] >= 0) {
- c++;
- }
- }
- a[i] = c;
- }
- for (int i = 0; i < n; i++) {
- cout << a[i] << " ";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement