Output:
Click Here For Java Online Compiler
Solution:
*** Star Pattern 3 *** * *** ***** ******* ********* ***********
Click Here For Java Online Compiler
Solution:
class StarPattern3 { public static void main(String args[]) { int rows = 7; System.out.println("*** Star Pattern 3 ***" + "\n"); for (int i = 1; i < rows; i++) { for (int j = rows; j > i; j--) { System.out.print(" "); } for (int j = 1; j <= i * 2 - 1; j++) { System.out.print("*"); } System.out.println(""); } } }
comment 0 comments:
more_vertsentiment_satisfied Emoticon