I already know that C(n,k+1)=C(n,k)*(n-k/k+1)

num=num*(i-j+1)/j;
int i,j,num;
for(i=0;i<n;i++){
for(j=0;j<=i;j++){
if(j==0 || j==i){
num=1;
printf("%d ",num);
}else {
num=num*(i-j+1)/j;
printf("%d ", num);
}
}
printf("n")

I want to know what differents between my fomular and fomular in program

New contributor

Phan Hồng Đạt is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.