public class Y {
public static void main(String[] args) {
int Yh [][]=new int [10][];
for(int j=0;j
Yh [j]=new int[j+1];
Yh [j][0]=Yh[j][j]=1;
if(j>1) {
for(int i=1;i<Yh[j].length-1;i++) {
Yh[j][i]=Yh[j-1][i-1]+Yh[j-1][i];
}
}
for(int k=0;k<Yh.length;k++) {
for(int x=0;x<Yh[k].length;x++) {
System.out.print(" "+Yh[k][x]);
}
System.out.println(" ");
}
}
}
}