Home > database >  C with binomial coefficient of Yang hui triangle, the first 13 line is correct, but the back is not
C with binomial coefficient of Yang hui triangle, the first 13 line is correct, but the back is not

Time:09-29

#include
Int main ()
{
Long int x, y, z, a=1, b=1, c=1, I, j, n.
Int k [200] [200];
Printf (" please enter Yang hui triangle lines: \ n ");
The scanf (" % d ", & amp; N);
for(i=1; I<=n; I++)
{

For (j=1; J<=I; J++)
{
A=1;
B=1;
C=1;

For (x=1; XFor (y=1; YFor (z=1; Z<=(I - j); Z++) {c=c * z; }
[I - 1 k]] [j - 1=a/(b * c);//eg. C (n, r)=n!/r! * (n - r)!
}
}
for(i=1; I<=n; I++)
{printf (" \ n ");
For (j=1; J<=I; J++)
6 {printf (" % d ", k [I - 1] [1]). }
}
printf("\n");
return 0;
}
//thank you
  • Related