Recent Posts
printf("ho_tari\n");
pyramid 본문
#include <stdio.h>
int main(void)
{
int height;
printf("Height of pyramid : ");
scanf("%d", &height);
for (int i = 1; i <= height; ++i)
{
for (int s = 1; s <= height - i; ++s)
{
printf(" ");
}
for (int j = 1; j <= 2 * i - 1; ++j)
{
printf("*");
}
printf("\n");
}
return 0;
}
<compile 결과>
'C' 카테고리의 다른 글
star2 (0) | 2023.09.01 |
---|---|
star (0) | 2023.09.01 |
procScore (0) | 2023.09.01 |
printOne2Ten (0) | 2023.09.01 |
printA2Z(가로) (0) | 2023.09.01 |