Given a x-by-x matrix filled with zeros (x is odd and > 3). Use 8s to draw a number 8 into it! Like this:
x = 5, y =
8 8 8 8 8
8 0 0 0 8
8 8 8 8 8
8 0 0 0 8
8 8 8 8 8
x = 7, y =
8 8 8 8 8 8 8
8 0 0 0 0 0 8
8 0 0 0 0 0 8
8 8 8 8 8 8 8
8 0 0 0 0 0 8
8 0 0 0 0 0 8
8 8 8 8 8 8 8
Solution Stats
Problem Comments
3 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers668
Suggested Problems
-
Project Euler: Problem 2, Sum of even Fibonacci
2822 Solvers
-
Get the length of a given vector
12896 Solvers
-
505 Solvers
-
472 Solvers
-
1771 Solvers
More from this Author12
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Please like it if it wasinteresting!
There is a very interesting solution that is create 7 segements on your array like a "7-segment Display"
https://www.electronics-tutorials.ws/blog/7-segment-display-tutorial.html
This way may seem more complicated but once you has the data of segements' coordinate on your matrix you can automate other solution in this group easily.
So i can call it is a master solution
Created the two blocks of zeros in a matrix of 8 ;-)