본문 바로가기

Notice
Recent Posts
Recent Comments
Link
«   2025/06   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Tags
더보기
Archives
Total
Today
Yesterday
관리 메뉴

인공지능을 알아가보자

별찍기(4) 본문

Emotion

별찍기(4)

lis29188 2018. 4. 2. 02:56
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <stdio.h>
int main(void)
{
    int i, j;
    int n;
    scanf("%d"&n);
    for (i = 0; i < n; i++)
    {
        for (j = 0; j < n - 1 - i; j++)
        {
            printf(" ");
        }
        for(j=0;j<=2*i;j++)
        {
            printf("*");
        }
        printf("\n");
    }
    return 0;
}
cs


'Emotion' 카테고리의 다른 글

별찍기(6)  (0) 2018.04.02
별찍기(5)  (0) 2018.04.02
별찍기(3)  (0) 2018.04.02
별찍기(2)  (0) 2018.04.02
별찍기(1)  (0) 2018.04.01
Comments