MCPcopy Create free account
hub / github.com/PrajaktaSathe/Java / pattern5

Method pattern5

Programs/patterns/Pattern5.java:14–22  ·  view source on GitHub ↗
(int n)

Source from the content-addressed store, hash-verified

12// * *
13// *
14 static void pattern5(int n) {
15 for (int row = 0; row < 2 * n; row++) {
16 int totalColsInRow = row > n ? 2 * n - row: row;
17 for (int col = 0; col < totalColsInRow; col++) {
18 System.out.print("* ");
19 }
20 System.out.println();
21 }
22 }
23
24}

Callers 1

mainMethod · 0.95

Calls 1

printMethod · 0.80

Tested by

no test coverage detected