#include <stdio.h>

void one();

void two();

void three();

int main(void) {

printf("======== [  one  ] ========\n");

one();

printf("======== [  two  ] ========\n");

two();

printf("======== [ three ] ========\n");

three();

return 0;

}

void one() {

int i, j;

for (i=0; i<6; i++) {

for (j=0; j<=i; j++) {

printf("%d", j);

printf("\n");

}

} // end of _one

void two() {

int i, j;

for (i=0; i<6; i++) {

for (j=5; j>=i; j--) {

printf("%d", j);

printf("\n");

}

} // end of _two

void three() {

int i, j;

for (i=5; i>=0; i--) {

for (j=i; j>=0; j--) {

printf("%d", j);

printf("\n");

}

} // end of _three



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

버블정렬  (0) 2016.06.12
369 게임 (네이버 답변)  (0) 2016.06.06
test  (0) 2016.06.02
c언어 + gcd lcm + 최대공약수 최소공배수  (0) 2016.05.30
중복없이 6개 출력  (0) 2016.05.22