Printing pattern 1 , 11 , 111 , 1001 ,11111,10001 . what is wrong?

#include

using namespace std;

int main()
{

int n ;
cin>>n;

int row = 1;
int col = 1;

while(row<=n){
if(row % 2 = 0)
{
//even row
cout<<1;

        while(col<=row-2){
            cout<<0;
            col = col +1 ;
        }
        cout<<1;
    }
    else{
         while(col<=row){
       cout<<1 ;
       col=col+1;
       }
        
    }
    row = row+1;
    cout<<endl;
   }

return 0;
}

hello @sp_wizard
pls share ur code using cb ide