知識社群登入
[程式練功區]C程式-Homework1
by 艾鍗學院, 2012-03-24 22:13, 人氣(2796)
Write  a  program  that  prints the  following  diamond  shape.  Your  program  should 
read  an  odd  number  in  the  range  1  to  51  to  specify  the  number  of  rows  in  the diamond, and then display a diamond of the appropriate size.   
You  may  use  output  statements  that  print  either  a  single  asterisk  (*) or  a  single blank. Maximize your use of repetition (with nested for statements) and minimize the number of output statements.

        *
       ***
      *****
     *******
    *********
   ***********
    *********
     *******
      *****
       ***
        *
討論
編號標題回應最後發表
11316
2
0