Skip to content

Instantly share code, notes, and snippets.

@TanjinAlam
Created August 18, 2017 00:26
Show Gist options
  • Save TanjinAlam/21971a2467606e6b9790b945ad7ac82c to your computer and use it in GitHub Desktop.
Save TanjinAlam/21971a2467606e6b9790b945ad7ac82c to your computer and use it in GitHub Desktop.
#include<stdio.h>
int main()
{
int x,y,n,a,z,s;
scanf("%d",&n);
printf("\n\n");
for(x=0; x<n; x++)
{
a=1;
for(s=0; s<(n-x); s++)
{
printf(" ");
}
for(y=0; y<=x; y++)
{
printf("%d ",a);
a=(a*(x-y)/(y+1));
}
printf("\n");
}
return 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment