Pattern 2

      No Comments on Pattern 2
class scan
{
 public static void main(String arg[])
{
int i,j,x,y,z;

for(i=7;i>0;i--)
 {
  for(j=0;j<i;j++)
   {
    System.out.print(" *");
   }
   for(x=0;x<7-i;x++)
    {
     System.out.print("  ");
    }
 
      for(int l=0;l<7-i;l++)
      {
       System.out.print("  ");
      }
      for(z=0;z<i;z++)
    {
     System.out.print(" *");
    }
 
    System.out.println("");
 }
	      
}
}

OUTPUT:-

pattern 2

Leave a Reply

Your email address will not be published. Required fields are marked *