메뉴 건너뛰기

창작에 관련된 질문이나 간단한 팁, 예제를 올리는 곳

        1
      121
    12321
  1234321
123454321

부탁 ㄷㄷ

조회 수 :
4331
등록일 :
2008.06.17
19:29:30 (*.153.39.155)
엮인글 :
게시글 주소 :
https://hondoom.com/zbxe/index.php?mid=study&document_srl=210703

똥똥배

2008.06.17
22:10:35
(*.239.144.2)

#include <stdio.h>
#include <math.h>

void main()
{
  for(int j=1; j<=5; ++j)
  {
    for(int i=0; i<9;++i)
    {
      if(abs(4-i) < j)
      {
    printf("%d", j-abs(4-i));
      }
   else printf(" ");
    }

    printf("\n");
  }

  getchar();
}

가능하면 스스로 하시길.

List of Articles