dimanche 11 juillet 2021

How to draw an asterisk circle using loops in java

I want to draw a circle in java with asterisk but without using graphics. I want to use loops (like we do in other patterns).

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

There is similar pattern present on SO but it is in ruby. I want the same pattern in java using loops.

Aucun commentaire:

Enregistrer un commentaire