int main()
{
int i, j;
for (i = 0; i < 5; i++)
{
for (j = 0; j < 5; j++)
{
if (i == j)
printf("*");
else if (i + j == 4)
printf("*");
else printf(" ");
}// ||로 두 조건을 묶고 else로 공백 출력하는 게 베스트
printf("\n");
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: