Output:
Click Here For Java Online Compiler
Solution:
*** Star Pattern 14 *** ******* * * * * * * * * * * *******
Click Here For Java Online Compiler
Solution:
/** * * @author Alee Ahmed Kolachi */ public class StarPattern14 { public static void main(String[] args) { int rows = 7; System.out.println("*** Star Pattern 14 ***" + "\n"); for (int i = 0; i < rows; i++) { if (i == 0 || i == 6) { for (int j = 0; j < rows; j++) { System.out.print("*"); } System.out.println(); } if (i >= 1 && i <= 5) { for (int j = 0; j < rows; j++) { if (j == 0 || j == 6) { System.out.print("*"); } else if (j >= 1 && j <= 5) { System.out.print(" "); } } System.out.println(); } } } }
comment 0 comments:
more_vertsentiment_satisfied Emoticon