728x90
반응형
문제 : https://codeup.kr/problem.php?id=1352
문제 설명
길이 n이 입력되면 길이가 n인 사각형을 출력하시오.
단, 사각형은 * 모양으로 채운다.
# include <stdio.h>
int main()
{
int i,j,n;
scanf("%d",&n);
for(i = 1; i<=n; i++)
{
for(j = 1; j<=n; j++)
{
printf("*");
}
printf("\n");
}
}
728x90
반응형
최근댓글