~cpp 
if __name__=='__main__':

    n = input('입력')

    for i in range(n):
        print ' ' * (n-i) + '*' * ((i*2)+1)
    for j in range(n, -1, -1):
        print ' ' * (n-j)  + '*' * ((j*2)+1)

Retrieved from http://wiki.zeropage.org/wiki.php/마름모출력/윤성복
last modified 2021-02-07 05:29:24