Skip to content

Multi-dimensional array → The star figure Java code challenge

Notifications You must be signed in to change notification settings

ndenic/The-Star-figure

Repository files navigation

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

About

Multi-dimensional array → The star figure Java code challenge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published