Posted by : ANIMESH SHAW Tuesday, 20 September 2011

#include<stdio.h>
#include<conio.h>
main()
{
int a[20][20],i,j,rows,num=25,k;
printf("\n enter the number of rows:");
scanf("%d",&rows);
for(i=0;i<rows;i++)
{
for(j=0;j<=i;j++)
{
if(j==0||i==j)
{
a[i][j]=1;
}
else
{
a[i][j]=a[i-1][j]+a[i-1][j];
}
printf("%4d",a[i][j]);
}
printf("\n");
}
getch();
}

One Response so far.

  1. very good !!!
    great collection for c programmers .keep going

    wish you very best luck

Popular Post

Blog Archive

Total Pageviews

Sign In

Follow by Email

Powered by Blogger.

Like Us on Facebook

Search This Blog

Loading...

Indian Coder

- Copyright © Programming Mania -Metrominimalist- Powered by Blogger - Designed by Johanes Djogan -