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