Cody

Solution 2076232

Submitted on 2 Jan 2020 by Asif Newaz
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
n = 2; p = ['* ';'**']; assert(isequal(pyramid(n),p));

a = 42 32 42 42

2   Pass
n = 3; p = ['* ';'** ';'***']; assert(isequal(pyramid(n),p));

a = 42 32 32 42 42 32 42 42 42

3   Pass
n = 4; p = ['* ';'** ';'*** ';'****']; assert(isequal(pyramid(n),p));

a = 42 32 32 32 42 42 32 32 42 42 42 32 42 42 42 42

4   Pass
n = 10; p = ['* '; '** '; '*** '; '**** '; '***** '; '****** '; '******* '; '******** '; '********* '; '**********']; assert(isequal(pyramid(n),p));

a = 42 32 32 32 32 32 32 32 32 32 42 42 32 32 32 32 32 32 32 32 42 42 42 32 32 32 32 32 32 32 42 42 42 42 32 32 32 32 32 32 42 42 42 42 42 32 32 32 32 32 42 42 42 42 42 42 32 32 32 32 42 42 42 42 42 42 42 32 32 32 42 42 42 42 42 42 42 42 32 32 42 42 42 42 42 42 42 42 42 32 42 42 42 42 42 42 42 42 42 42

Suggested Problems