/ Assignment / assignment_19.java
assignment_19.java
1 /* 2 * Output the following pattern 3 * 1 4 * 1 2 5 * 1 2 3 6 * 1 2 3 4 7 * 1 2 3 4 5 8 */ 9 public class assignment_19 { 10 public static void main(String[] args) { 11 for (int i = 0; i < 6; i++) { 12 for (int j = 1; j < i + 1; j++) { 13 System.out.print(j); 14 } 15 System.out.println(); 16 } 17 } 18 }