Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //13
- #include <iostream>
- using namespace std;
- int main()
- {
- int n, sum, index = -1;
- cin >> n;
- int arr[n][n];
- for(int i = 0; i < n; i++){
- sum = 0;
- for(int j = 0; j < n; j++){
- cin >> arr[i][j];
- sum += arr[i][j];
- }
- if(sum > 20 && index == -1){
- index = i;
- }
- }
- for(int i = 0; i < n; i++){ // номер столбца
- for(int j = index; j < n - 1; j++){
- arr[j][i] = arr[j + 1][i];
- }
- }
- cout << endl;
- if(index == -1){
- cout << "NET STROK SUMMOI BOLSHE 20!!!";
- return 0;
- }
- for(int i = 0; i < n - 1; i++){ // номер строки
- for(int j = 0; j < n; j ++){
- cout << arr[i][j] << " ";
- }
- cout << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment