https://hack.codingblocks.com/contests/c/465/169
Hollow Diamond Pattern(Pattern 6)
unable to solve?
Https://hack.codingblocks.com/contests/c/465/169
Do u need code or some hint…
i need the code for above question hollow diamond pattern
Heyy ! actually this question is easy to think , you should do this yourself . If you are not able to do it then see this hint first and then try again , if you stilll not able to do that then you can go through this link
Hint -> first try to handle for printing first and last line separately then think about for printing n-2 lines between the first and last . So you can see easily that for n/2 lines output lines are following some relation i.e. print n/2-i star( * ) first and then 2*i+1 space and then again n/2-i star( * ) . But for i> n/2 this relation should be reversed as you can see the outputs are in reversed order as what in first part . Similarly for this
My code -->> https://ide.codingblocks.com/#/s/16481
Happy Coding