Program to print Pascle series in c language.

 Pascle traingle-

program:-


#include<stdio.h>
// function for calculate factorial
int fact(int n)
{
int i,f=1;
for(i=1;i<=n;i++)
f=f*i;
return f;
}
// function for calculate combination
int combi(int n,int r)
{
return (fact(n)/fact(nr)/fact(r));
}
int main()
{
int i,j,c;
for(i=0;i<=5;i++)
{
for(j=0;j<=5i;j++)
printf(” “);
for(j=0;j<=i;j++)
{
c=combi(i,j);
printf(“%d “,c);
}
printf(“n”);
}
return 0;
}

13 thoughts on “Program to print Pascle series in c language.

Leave a Reply

Your email address will not be published.