Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(){
- int n=3;
- int lin = n*2;
- int col = 6;
- int matriz[lin+1][col+1];
- for(int i=1; i<=lin; i++){
- cout <<"\n";
- for(int j=1; j<=col; j++){
- if((i==1) || (i==col)){
- cout << " 1 ";
- }
- if((i==2) || (i==(col-1))){
- if( (j==1) || (j==6) ){
- cout << " 1 ";
- }else{
- cout << " 2 ";
- }
- }
- if((i==3) || (i==(col-2))){
- if( (j==1) || (j==6) ){
- cout << " 1 ";
- }else if( (j==2) || (j==5)){
- cout << " 2 ";
- }else{
- cout << " 3 ";
- }
- }
- }
- }
- getchar();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement