- #1
shivajikobardan
- 674
- 54
How to print this pyramid pattern?
I've built a matrix like this in order to generate logic. The "0" means spaces.
At i=1, j=5 should be printed as star, rest as white spaces
At i=2, j=4,6…
At i=3, j=3,5,7….
At i=4,j=2,4,6,8…
At i=5, j=1,3,5,7,9…
How do I convert this into logic?
I've built a matrix like this in order to generate logic. The "0" means spaces.
At i=1, j=5 should be printed as star, rest as white spaces
At i=2, j=4,6…
At i=3, j=3,5,7….
At i=4,j=2,4,6,8…
At i=5, j=1,3,5,7,9…
How do I convert this into logic?
Attachments
Last edited: