728x90
#include <stdio.h>
int main(void)
{
/*
*
**
***
****
*****
*/
for (int i = 0; i < 5; i++)
{
for (int j = i; j < 5 - 1; j++)
{
printf(" ");
}
for (int k = 0; k <= i; k++)
{
printf("*");
}
printf("\n");
}
return 0;
}
결과
728x90
'개발자 모드 > C언어' 카테고리의 다른 글
C언어 if - else if - else (0) | 2021.09.15 |
---|---|
C언어 조건문 (0) | 2021.09.15 |
C언어 반복문 별찍기... (0) | 2021.09.15 |
C언어 for 2중 반복문 (0) | 2021.09.13 |
C언어 do while 반복문 (0) | 2021.09.13 |