Problem 54159. Draw "C" in a zero matrix

Given a x-by-x matrix filled with zeros (x> 4). Use 1 to draw a letter C into it! Like this:
x = 5, y =
1 1 1 1 1
1 0 0 0 1
1 0 0 0 0
1 0 0 0 1
1 1 1 1 1
x = 7, y =
1 1 1 1 1 1 1
1 0 0 0 0 0 1
1 0 0 0 0 0 0
1 0 0 0 0 0 0
1 0 0 0 0 0 0
1 0 0 0 0 0 1
1 1 1 1 1 1 1

Solution Stats

47.46% Correct | 52.54% Incorrect
Last Solution submitted on Apr 07, 2024

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers27

Suggested Problems

More from this Author1

Community Treasure Hunt

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

Start Hunting!