Draw X


Submit solution

Points: 40 (partial)
Time limit: 1.0s
Memory limit: 64M

Authors:
Problem types
Allowed languages
Java 19, Java 8

題目說明

輸入一個整數n,

若為奇數,印出長寬為n的X (以X繪製)

若為偶數,印出文字"__ is not an odd number."

輸入

一個整數

輸出

(同題目說明)

sample input1

7

sample output1

X     X
 X   X 
  X X  
   X   
  X X  
 X   X 
X     X

sample input2

8

sample output2

8 is not an odd number.

Comments

There are no comments at the moment.