Program to show Pascal's Triangle in decending order

Program to show Pascal's Triangle in decending order 


Program:


#include<stdio.h>
void main()
{
int i,j,n;
printf(“Enter number of rows upto which you want pascal's triangle: ”);
scanf(“%d”,&n);
for(i=1;i<=n;i++)
{
for(j=n;j>=i;j--)
{
printf("* ");
}
printf("\n");
}
}

Output:



No comments:

Post a Comment