View Code of Problem 3926

#include<stdio.h>
#include<math.h>
int main(){
	int n,m,a,b;//矩阵行放大A倍,列放大B倍
	scanf("%d%d%d%d",&n,&m,&a,&b);//n*m的矩阵
	getchar();
	char s[100];
	int i,j,k,t;
	for(t=0;t<n;t++){
		scanf("%s",&s);
		for(i=0;i<a;i++){
			for(j=0;j<m;j++){
				for(k=0;k<b;k++){
					printf("%c",s[j]);
				}
			}
			printf("\n");
		}
	} 
	return 0;
}

Double click to view unformatted code.


Back to problem 3926