#include <iostream>
using namespace std;
int main(){
int n,i,j,a[100][100],x0,x1,x2;
cout<<"Introduceti dimensiunea matricii:";
cin>>n;
a[0][0]=1;
a[0][1]=1;
x0=1;
x1=1;
for(i=0;i<n;i++){
for(j=0;j<n;j++){
if(i==0&&j<2){
continue;
}
a[i][j]=x0+x1;
x0=x1;
x1=a[i][j];
}
}
cout<<"Matricea obtinuta este:\n";
for(i=0;i<n;i++){
for(j=0;j<n;j++){
cout<<a[i][j]<<" ";
}
cout<<endl;
}
return 0;
}