//#include "stdafx.h"//vc++6.0加上这一行.
#include
int main(void){
int i, j, k,a[10]={0,1,};
cout << "Yang hui triangle 7 layer:\n";
cout.setf(ios::left);
for(*(a+1)=i=1;i<=7;i++){
for(k=0;k<(10-i)*2+1;cout << ' ',k++);
for(j=i;j>=1;j--)
cout << setw(4) << (*(a+j)+=*(a+j-1));
cout << endl;
}
return 0;
}