# include
# include
long int power(long int base,long int expo)
{
long int i,value=1;
for(i=0;i
{
value=base*value;
}
return value;
}
int main()
{
long int n,t,i,l,p,digit,p1,expo,rnum=0,digit1;
l=0;
printf(“Enter the Height of Your Pascal Triangle:”);
scanf(“%ld”,&n;);
for(t=1;t<=n;t++)
{
for(i=t;i
printf(” “);
expo=t-1;
if(l==0)
{
p=1;
printf(“%ld”,p);
}
else {
p=11*p;
p1=p;
while(p1>0)
{
digit=p1%10;
rnum=rnum+digit*power(10,expo);
p1=p1/10;
expo–;
}
while(rnum>0)
{
digit1=rnum%10;
printf(“%ld “,digit1);
rnum=rnum/10;
}
}
l++;
printf(“n”);
}
return 0;
}
Output
If you have any query then do leave us a comment.Thanks!!!