/* Program to construct a pascal triangle
	  1
	1   1
             1   2   1
           1   2   3   1
*/

#include<stdio.h>
main()
{
	int r,x,i,j,binomial;
	clrscr();
	binomial=1;
	for(i=0;i0;--r)
		printf(" ");
		for(x=0;x<=i;++x)
		{
		  if((x==0)||(i==0))
		    binomial=1;
		  else
		    binomial=binomial*(i-x+1)/x;
		    printf("%6d",binomial);
		}
		printf("\n");
		++i;
	}
	getch();
}