Odd row is not comming "1"

#include
using namespace std;

int main()
{
int i, j, N;

//cout<<("Enter N: ");
cin>>N;

for(i=1; i<=N; i++)
{
    for(j=1; j<=i; j++)
    {
        if(i==1 || j==1 || j==i || i ==2*i+1)
        {
            cout<<("1");
        }
        else
        {
            cout<<("0");
        }
    }

    cout<<endl;
}

return 0;

}

Hello @balram,
Your condition for odd rows is wrong.
Use the condition i%2==1 instead of i==2*i+1.