samedi 3 octobre 2015

Pattern Printing in C

Hey I am stuck to find a logic to print this pattern. I tried a lot but can't find any way.

My Problem is:

I have an array which contains some random integers and based on that I have to print stars(*) in vertically format.

For example:

array = [2,3,5,2,6];

Then the pattern will be:

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

Aucun commentaire:

Enregistrer un commentaire