View Code of Problem 3926

#include <iostream>
#include <cstdio>
#include <cstring>
#include <string>

using namespace std;

int main(){
    int n,m,a,b;
    scanf("%d %d %d %d",&n,&m,&a,&b);
    getchar();
    int mtx[110][110];
    memset(mtx,0,sizeof(mtx));
    for(int i=1;i<=n;i++){
        for(int j=1;j<=m;j++){
            scanf("%d",&mtx[i][j]);
        }
    }
    for(int i=1;i<=n;i++){
        for(int j=1;j<=a;j++){
            for(int k=1;k<=m;k++){
                for(int x=1;x<=b;x++){
                    cout<<mtx[i][j];
                }
            }
            cout<<endl;
        }
    }

    return 0;
}

Double click to view unformatted code.


Back to problem 3926