Code:
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a[20],n;
a[0]=1;
a[1]=1;
cout<<"Enter the limit"<<endl;
cin>>n;
for(int j=1;j<=n;j++)
 {
  for(int i=2;i<=j;i++)
  {
   a[i]=a[i-1]+a[(i-1)-1];
  }
 }
for(j=0;j<=n;j++)
 {
  for(int i=0;i<=j;i++)
  {
  cout<<a[i];
  }
 cout<<endl;
 }
getch();
}

Last edited by shabbir; 30Jul2012 at 10:32.. Reason: Code blocks