View Code of Problem 3926

#include <stdio.h>
 
int main()
{
	int n,m,a,b;
	while(scanf("%d%d%d%d",&n,&m,&a,&b)!=EOF)
	{
		int col[200][200];
 
		char str[100]={'\0'};
		int t=0,k=0,p=0;
		for(int i=0;i<n;i++)
		{
			scanf("%s",str);
			for(int z=0;z<a;z++)
			{
				k=0;
				for(int j=0;j<m;j++)
				{
					for(int r=0;r<b;r++)
				{
					col[p][k]=str[j]-'0';
					k++;
				}		
			}
			p++;
		}
	}
	for(int i=0;i<n*a;i++)
	{
		for(int j=0;j<m*b;j++)
		{
			printf("%d",col[i][j]);
		}
		printf("\n");
	}
	
	}
}

Double click to view unformatted code.


Back to problem 3926