So, this is the structure.

****
***
**
*
*
**
***
****

You left so much unwritten here. What target CPU, board and OS along with the display system.

This also looks like homework so beyond the missing detail, you must show your effort so far.
Read https://www.daniweb.com/welcome/rules

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.