data yhsj1;
array x[7] ;
array m[7] ;
do i=1 to 7;
x1=1; x2=lag(i);
do j=2 to 6;
m[j]+x[j]; x[j+1]=lag(m[j]);
end; output;
end;
proc print;
title 'yhsj';
var x1-x7;
run;
%macro yanghui(n=);
data _null_;
do i=1 to &n;
do j=0 to i;
n=fact(i)/(fact(j)*fact(i-j));
if i=1 then put #i @40 n @;
else put #i @(40-2*i+4*j) n @;
end;
end;
run;
%mend;
%macro triangle(n);
data _temp;
array num {&n} n1-n&n;
do i = 1 to &n;
do j = 1 to i;
num[j]=comb(i-1,j-1);
end;
output;
end;
drop i j;
run;
proc print; run;
%mend;
%triangle(9);