별찍기

언어/c언어2017. 7. 13. 18:30

# include <stdio.h>


int main(void) {

char star = '*';

int height = 0;

int temp = 1;

int temp1 = 1;

printf("height => ");

scanf("%d", &height);

Rev:

if (temp1 > height) {

goto end;

}

else {

if (temp <= temp1) {

printf("%c", star);

temp++;

}

else {

temp1++;

temp = 1;

printf("\n");

}

}

goto Rev;

end:

return 0;

}

'언어 > c언어' 카테고리의 다른 글

오버 플로우 됬는지 확인하는 코드 (c언어)  (0) 2017.07.30
추가할 임시 코드 [ 계산기 ]  (0) 2017.07.30
c언어 시저 코드  (0) 2017.07.04
네이버 답변  (0) 2017.07.01
c언어 boolean type  (0) 2017.06.27