Whats wrong in the code?

int n;
cin>>n;
for(int row=1;row<=n;row++){
for(int col=1;col<=row;col++){
if(row==1){
cout<<row;
}else if(row>1){
if(col==1 || col==row){
cout<<i<<" β€œ;
else if(col>1 && col<row){
cout<<0<<” ";
}
}
}
}cout<<endl;
}

i have modified your code …there are some mistakes in your code like you are using i without declaring it ,use " " for space. you are not using if else if else in correct syntax. Here is the modified code check this link it is working fine https://ide.codingblocks.com/s/213325