package zzy;
import static java.lang.System.*;
import java.util.*;
/**
*
* @author Zhu Zhengyan
*/
public class yanghuisanjiao {
public static void main(String[] args)
{
int[][] a = new int[10][];
for(int i = 0;i<10;i++)
{
a[i] = new int[i+1];
}
for(int i = 0;i<a.length;i++)
{
for(int j = 0;j<a[i].length;j++)
{
int zhi = 1;
for(int k = 1;k<=j;k++)
{
zhi = zhi*(i+1-k)/k;
}
a[i][j] = zhi;
}
}
for(int[]b:a)
{
for(int c:b)
out.printf("%5d",c);
out.println();
}
}
}
import static java.lang.System.*;
import java.util.*;
/**
*
* @author Zhu Zhengyan
*/
public class yanghuisanjiao {
public static void main(String[] args)
{
int[][] a = new int[10][];
for(int i = 0;i<10;i++)
{
a[i] = new int[i+1];
}
for(int i = 0;i<a.length;i++)
{
for(int j = 0;j<a[i].length;j++)
{
int zhi = 1;
for(int k = 1;k<=j;k++)
{
zhi = zhi*(i+1-k)/k;
}
a[i][j] = zhi;
}
}
for(int[]b:a)
{
for(int c:b)
out.printf("%5d",c);
out.println();
}
}
}