1)
Code:
void main()
{
int f1=1,f2=1,f3=0,n=5,i,j;
for(i=1;i<=5;i++)
{
   printf("\n%d %d ",f1,f2);
   for(j=2;j<=i;j++)
   {
    
    f3=f1+f2;
    printf("%d ",f3);
    f1=f2;
    f2=f3;
   }
}
}
 2)
void main()
{
int i=0,j=0;
for(i=1;i<=4;i++)
{
    for(j=1;j<=i;j++)
  printf("%d",j);
  for(j=i-1;j>=1;j--)
  printf("%d",j);
printf("\n");
}
}

Last edited by shabbir; 17Aug2012 at 19:25.. Reason: Code blocks