Quick actions

cmd+k|ctrl+k

Navigation

Languages

lab7_1053

Snippet info

Language

Cpp

Visibility

public

Author

maloy-

Created

2018-12-11T22:06:29Z

Updated

2018-12-11T22:06:29Z

#include <iostream>
using namespace std;

int main() {
    
    const int n = 12 ; 
    int a[n][n] , b[n][n] ; 
    
    for (size_t i = 0 ; i < n ; i++){
        for (size_t j = 0 ; j < n ; j++){
            a[i][j] = i+1; 
            b[i][j]=a[i][j];
            cout << a[i][j] << "  ";
        }
        cout << endl ; 
    }
    
    int x = 2;
    
    for (size_t i = 8 ; i > 1 ; i--){
        for (size_t j = 0 ; j < n ; j++){
            b[x][j] = a[i][j];
            
        } x++;
    }
    
    cout << endl ; 
    
    for (size_t i = 0 ; i < n ; i++){
        for (size_t j = 0 ; j < n ; j++){
            cout << b[i][j] << "  ";
        }
        cout << endl ; 
    }
    
    
    
    
    return 0;
}
INFO