~cpp
#include <stdio.h>
int xor(int front,int back){
	if(front==back)
		return 0;
	else
		return 1;

}
int main(void){
	const int MAX=50;
	int tri[MAX][MAX]={0,};
	int i,j,k;
	int col=8;

	tri[1][1]=1;
	for(i=0;i<col;i++){
		tri[i][0]=1;
		for(k=col-i;k>0;k--)
			printf(" ");
		for(j=0;j<=i;j++){
			tri[i+1][j+1]=xor(tri[i][j],tri[i][j+1]);
			printf(" %d",tri[i][j]);
		}
		printf("\n");
	}
	printf("\n");
	return 0;
}

----
XOR삼각형
임다찬
Retrieved from http://wiki.zeropage.org/wiki.php/XOR삼각형/임다찬
last modified 2021-02-07 05:28:27