print like this in java
111
222
333
Answers
Answered by
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
Geography,
27 days ago
English,
27 days ago
Social Sciences,
27 days ago
Math,
1 month ago
India Languages,
1 month ago
Physics,
9 months ago