3 Write a Java program to generate the following Pattern
1 1 1 1 1
2 2 2 2 2
3 3 3 3 3
4 4 4 4 4
Answers
Answered by
4
Program: {JAVA}
public class Pattern3 {
public void display() {
for(int i=1;i<=4;i++) {
for(int j=1;j<=5;j++) {
System.out.print(i+ “ ");
}
System.out.println();
}
Similar questions