Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int bi_coeff(int a);
- void main()
- {
- int n;
- printf("Enter the number of rows: ");
- scanf("%d",&n);
- bi_coeff(n);
- }
- int bi_coeff(int a)
- {
- int i,j,result=1;
- for(i=0;i<a;i++)
- {
- for(j=0;j<=i;j++)
- {
- if(i==0||j==0)
- result=1;
- else
- result=(result*(i-j+1))/j;
- printf("%d ",result);
- }
- printf("\n");
- }
- }
Add Comment
Please, Sign In to add comment