728x90
반응형
코드
더보기
# include <stdio.h>
void display(char cr, int lines, int width);
int main()
{
char c;
int rows, cols;
while((c = getchar())!='\n')
{
scanf("%d %d",&rows,&cols);
display(c,rows,cols);
}
return 0;
}
void display(char cr, int lines, int width)
{
int row,col;
for(row = 1; row<=lines; row++)
{
for(col = 1; col<=width; col++)
putchar(cr);
putchar('\n');
}
}
728x90
반응형
최근댓글