Computer Science, asked by reddysandhyareddy3, 22 days ago

print like this in java
111
222
333​

Answers

Answered by anindyaadhikari13
1

Solution.

Here, I have assumed that the number of rows for the pattern is fixed.

Coming to program -

public class Pattern{

   public static void main(String s[]){

       for(int i=1;i<=3;i++){

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

               System.out.print(i);

           System.out.println();

       }

   }

}

Output.

111

222

333

See attachment for verification.

Attachments:
Similar questions