1)
Code:
#include<conio.h>
#include<stdio.h>
void main()
{
int a,b,c,i,j,array[10][10];
clrscr();
for(i=1;i<=5;i++)
{
a=0,b=1;
for(j=1;j<=i;j++)
{
if(j==1)
array[i][j]=1;
else
{
c=a+b;
array[i][j]=c;
a=b;
b=c;
}
}
}
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",array[i][j]);
printf("\t");
}
printf("\n");
}
getch();
}

Last edited by shabbir; 1Jun2009 at 10:04.. Reason: Code blocks
abhix95 like this