#include<stdio.h>

int main(){

   int n, a, b, c=1;

   scanf("%d", &n);

   for(a=n;a>0;){

      for(b=0;b<a;b++){
         printf("*");

      }
      printf("\n");
   
      if(a==0)
         c=0;

      if(c==0)
         a++;

      else
         a--;

      if(c==0 && a==n)
         break;

   }

   for(;;);
}


이거 출력하면 
***
**
*
**
***
이렇게 뜨는데
***
**
*
*
**
***

이렇게 반복문 사용해서 뜨게하는 방법 아는 사람있나?

아는 사람있으면 이메일 남기면 불닭볶음면하고 롯데월드 불고기버거 기프트콘 준다