Pattern 6

11111

1111

111

11

1

package Patterns;
class pattern8
{
public static void main()
    {
for(int i=1;i<=5;i++)
        {
for(int j=5;j>=i;j--)
            {
System.out.print(1);
            }
System.out.println();
    }
}
}

Pattern 7

***

***

***

***

***

package Patterns;
class pattern6
{
public static void main()
    {
for(int i=1;i<=5;i++)
    {
for(int j=1;j<=3;j++)
       {
System.out.print("*");
       }
System.out.println();
    }
}
}

Pattern 8

12345

2345

345

45

5

package Patterns;
class pattern10
{
public static void main()
    {
for(int i=1;i<=5;i++)
        {
int k=i;
for(int j=5;j>=i;j--)
            {
System.out.print(k++);
            }
System.out.println();
    }
}
}

Pattern 9

*

**

***

****

*****

****

***

**

*

package Patterns;
class pattern14
{
public static void main()
    {
for(int i=1;i<=5;i++)
       {
for(int j=1;j<=i;j++)
            {
System.out.print("*");
            }
System.out.println();
        }
for(int a=1;a<=4;a++)
        {
for(int b=4;b>=a;b--)
            {
System.out.print("*");
            }
System.out.println();
        }
    }
}

Pattern 10

*****

****

***

**

*

package Patterns;
class pattern12
{
public static void main()
    {
for(int i=1;i<=5;i++)
       {
for(int j=5;j>=i;j--)
            {
System.out.print("*");
            }
System.out.println();
       }
}
}

LEAVE A REPLY

Please enter your comment!
Please enter your name here