Pattern to be printed -
*****
*****
*****
Program -
public class BoxPattern {
public static void main(String[] args) {
for (int i = 1; i <= 3; i++) {
for (int j = 1; j <= 5; j++) {
System.out.print("*");
}
System.out.println();
}
}
}
*****
*****
*****
Program -
public class BoxPattern {
public static void main(String[] args) {
for (int i = 1; i <= 3; i++) {
for (int j = 1; j <= 5; j++) {
System.out.print("*");
}
System.out.println();
}
}
}
No comments:
Post a Comment