[정올] Language Coder_반복제어문3_형성평가7_code146 (C)

두비니

·

2020. 4. 9. 00:56

 

 

#include <stdio.h>

int main() {

	int n, a=65, b=0;

	scanf("%d", &n);

	for (int i = 1; i <= n; i++) {
		for (int j = 0; j <= n-i; j++) {
			printf("%c ", a+j);
			if (j == n-i)
				a += j+1;
		}
		for (int j = 0; j < i-1; j++) {
			printf("%d ", b+j);
			if (j == i-2)
				b += j + 1;
		}
		printf("\n");
	}


	return 0;
}