jeudi 19 mars 2015

How to generate a star Triangle pattern using Java.

How to print a star triangle pattern using java. Pattern is something like this



* ====> row 1
* *
* *
* *
* * * * *


it can be n number of rows and from second row onwards there is odd number of white spaces between 2 stars like, 1,3,5, and last row have all the stars each separated by one white space.


How do I proceed?


Aucun commentaire:

Enregistrer un commentaire