05-18 17:53
Notice
Recent Posts
Recent Comments
Link
관리 메뉴

코딩일지

백준코딩 알고리즘 2440번: 별찍기 - 3 본문

코딩/백준코딩

백준코딩 알고리즘 2440번: 별찍기 - 3

여유거북이 2016. 11. 5. 23:01

첫째 줄에는 별 N개, 둘째 줄에는 별 N-1개, ..., N번째 줄에는 별 1개를 찍는 문제

 

 

#include <stdio.h>
int main(void)
{
 int i, j, n;

 scanf("%d", &n);

 for(i = n; i > 0; i--)
 {
  for (j = 1; j <= i; j++)
   printf("*");
  printf("\n");
 }
}

Comments