Programming/C/C++ [C언어] 피라미드 MNLT 2008. 10. 23. 00:36 층수를 입력받은 층만큼 피라미드 출력. 소스보기접기 #include void main() { int iX, iY, iInput; scanf("%d", &iInput); for(iX = 0; iX <= (iInput - 1); ++iX) { for(iY = -(iInput - 1); iY <= (iInput - 1); ++iY) { if(abs(iY) <= iX) printf("●"); else printf("○"); } printf("\n"); } } 접기