Problem list
Log in
#r02960 · Online Judge > GoldOJ

Draw an X

Bronze II 2.0 s 1024 MB

Given an odd integer $n$, print an X of size $n$: in row $r$ (0-based) put * at columns $r$ and $n-1-r$, spaces elsewhere.

Input

One odd integer $n$ ($5 \le n \le 49$).

Output

Print the $n \times n$ X shape.

Example 1

Input
5
Output
*   *
 * *
  *
 * *
*   *
Source
Online Judge > GoldOJ
Appears in
Not part of a ladder, contest or set yet.
Accepted 0 Submissions 0 Acceptance 0% Solvers 0

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code