标签:system.in img 数组 san info .com code 维数 bsp
package yanghuisanjiao;
import java.util.Scanner;
public class yiweishuzu {
public static void main(String[] args) {
@SuppressWarnings("resource")
Scanner scanner = new Scanner(System.in);
int n=scanner.nextInt();
int i,j,k;
int a[]=new int[100];
int b[]=new int[100];
for (i=0;i<n+1;i++)
{ a[i]=1;
b[i]=a[i];}
for(i=-1;i<n;i++) {
for(j=1;j<=i;j++)
b[j]=a[j-1]+a[j];
for(k=1;k<=i;k++)
a[k]=b[k];
for(j=n-i;j>0;j--)
System.out.print(" ");
for(k =0;k<=i+1;k++)
System.out.print(a[k]);
System.out.println("\n");
}
}
}
标签:system.in img 数组 san info .com code 维数 bsp
原文地址:https://www.cnblogs.com/Java199-wfx/p/10632494.html