package corejava;

public class DemoTwoD {
	public static void main(String args[]) {
		int DevtwoD[][] = new int[4][];
		DevtwoD[0] = new int[1];
		DevtwoD[1] = new int[2];
		DevtwoD[2] = new int[3];
		DevtwoD[3] = new int[4];

		int a, b,c=0;

		for (a = 0; a < 4; a++)
		    for (b = 0; b < a + 1; b++) {
			DevtwoD[a][b]=c;
			c++;
		}
		for (a = 0; a < 4; a++) {
			for (b = 0; b < a + 1; b++)
			System.out.print(DevtwoD[a][b] + " ");
			System.out.println();
	    }
    }

 }



