Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 649 Bytes

README.md

File metadata and controls

14 lines (10 loc) · 649 Bytes

The-Star-figure

Code Challenge — Write a program

Given an odd number n, not exceeding 15. Create a two-dimensional array (matrix) from n×n elements, by filling it with "." symbols (each element of the matrix is a string containing a single symbol). Then fill the middle row of the matrix, the middle column, and the main and the secondary diagonals with the "" symbols. As a result, all ""s in the array must form the star figure. Output this matrix; elements of the array should be space separated.

Sample Input 1:

5

Sample Output 1:

Image of output