Computer Science, asked by online01, 7 months ago

PRINT THE PATTERN IN JAVA NESTED FOR LOOP :-​

Attachments:

Answers

Answered by vijayghore
0

Answer:

Explanation:

class Sample

{

    public static void main(String args[])

    {

         int k=1;

         for(int i=4;i>=1;i++)

         {

              for(int j=1;j<=i;j++)

              {

                     System.out.print(k + "   ");

              }

              System.outprintln();

              k=k+2;

         }

    }

}

Similar questions