#include<stdio.h>
void main()
{
int num,x,y,a[50][50];
clrscr();
fflush(stdin);
printf("Enter the number of rows: ");
scanf("%d",&num);
printf("\n\t\tPascal's Triangle of Order %d\n\n",num);
for(x=0;x<num;x++)
{
for(y=0;y<=x;y++)
{
if(x==y y==0)
a[x][y]=1;
else
a[x][y]=a[x-1][y-1]+a[x-1][y];
printf("%4d",a[x][y]);
}
printf("\n\n");
}
getch();
}
Sum of numbers in a nth row can be determined using the formula 2^n. For the 100th row, the sum of numbers is found to be 2^100=1.2676506x10^30.
Pascal's triangle
pascal
35
1,4,6,4,1
Sum of numbers in a nth row can be determined using the formula 2^n. For the 100th row, the sum of numbers is found to be 2^100=1.2676506x10^30.
The number of odd numbers in the Nth row of Pascal's triangle is equal to 2^n, where n is the number of 1's in the binary form of the N. In this case, 100 in binary is 1100100, so there are 8 odd numbers in the 100th row of Pascal's triangle.
Pascal's triangle
pascal
The Sierpinski Triangle
pascals triangle is used to solve math problems that have chance of 2 different outcomes, such as flipping a coin
in the 11th century...
(a+b)7
35
1,4,6,4,1
Blaise Pascal.
Pascal didn't invent pascals triangle, he just made It popular. A Chinese mathematician invented it in about 1015.