Cody

# Problem 45370. Sky full of stars - 03

Solution 2169280

Submitted on 22 Mar 2020 by Mehmed Saad
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
a=[ '************' '***** *****' '**** ****' '*** ***' '** **' '* *' '* *' '** **' '*** ***' '**** ****' '***** *****' '************']; assert(isequal(star_pattern_3(6),a))

y = 12×12 char array '************' '***** *****' '**** ****' '*** ***' '** **' '* *' '* *' '** **' '*** ***' '**** ****' '***** *****' '************'

2   Pass
a=[ '******' '** **' '* *' '* *' '** **' '******']; assert(isequal(star_pattern_3(3),a))

y = 6×6 char array '******' '** **' '* *' '* *' '** **' '******'

3   Pass
a=[ '****' '* *' '* *' '****']; assert(isequal(star_pattern_3(2),a))

y = 4×4 char array '****' '* *' '* *' '****'

4   Pass
a=[ '********************' '********* *********' '******** ********' '******* *******' '****** ******' '***** *****' '**** ****' '*** ***' '** **' '* *' '* *' '** **' '*** ***' '**** ****' '***** *****' '****** ******' '******* *******' '******** ********' '********* *********' '********************']; assert(isequal(star_pattern_3(10),a))

y = 20×20 char array '********************' '********* *********' '******** ********' '******* *******' '****** ******' '***** *****' '**** ****' '*** ***' '** **' '* *' '* *' '** **' '*** ***' '**** ****' '***** *****' '****** ******' '******* *******' '******** ********' '********* *********' '********************'

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!