Pattern Prinitng

11111
12222
12333
12344
12345


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

5 comments: