Nyika 0 Newbie Poster

I need help writing a for-loop that will achieve the following pattern a certain number of times. In the example below, the number is 4 (determined by the leading | in pattern:

*****************| 222222
*****************0 2
****************0 0 2
************| 222222
************0 2
***********0 0 2
*******| 222222
*******0 2
******0 0 2
**| 222222
**0 2
*0 0 2
222222

Be a part of the DaniWeb community

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