Computer Science, asked by amoghhegde3, 11 months ago

pattern printing (java)

1
33
555
7777
99999

Answers

Answered by Anonymous
1

Answer:

class pattern

{

   public static void main()

   {

   for(int i=1; i<=9; i+=2)

   {

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

       {

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

       }

       System.out.println();

   }

}

}

Similar questions