Why some test cases are failing for this code.
#include
using namespace std;
int main()
{
int n,x=1,y=1,z=x+y,a=0;
cin>>n;
for(int i=1;i<=2;i++)
{
for(int j=1;j<=i;j++)
{
cout<<a<<"\t";
}
a++;
cout<<endl;
}
for(int i=3;i<=n;i++)
{
for(int j=1;j<=i;j++)
{
cout<<z<<"\t";
x=y;
y=z;
z=x+y;
}
cout<<endl;
}
return 0;
}