Reverse Pyramid
題目說明
輸入一個整數n,
若為奇數,印出底長為n的「倒」金字塔 (以A
繪製)
若為偶數,印出文字"__ is not an odd number."
輸入
一個整數
輸出
(同題目說明)
範例輸入1
7
範例輸出1
AAAAAAA
AAAAA
AAA
A
注意:每行長度皆為n,不印A
的地方印空格
sample input2
8
sample output2
8 is not an odd number.
輸入一個整數n,
若為奇數,印出底長為n的「倒」金字塔 (以A
繪製)
若為偶數,印出文字"__ is not an odd number."
一個整數
(同題目說明)
7
AAAAAAA
AAAAA
AAA
A
注意:每行長度皆為n,不印A
的地方印空格
8
8 is not an odd number.
Comments