(int n)
| 9 | // * * * |
| 10 | // * * * * |
| 11 | private static void pattern1(int n) { |
| 12 | // for every row, run the col |
| 13 | for (int row = 0; row <= n; row++) { |
| 14 | for (int col = 0; col < row; col++) { |
| 15 | System.out.print("* "); |
| 16 | } |
| 17 | System.out.println(); |
| 18 | } |
| 19 | } |
| 20 | } |
| 21 |