Sir I am confuse in pattern code challenge. I can not get test case

Check My code sir :-
#include
using namespace std;
int main()
{
int i,j,N;
N>=0&&N<=9;
cin>>N;

for(i=1;i<=N;i++)
{
    for(j=i;j<=N;j++)
    {
        cout<<"*";
    }


for(j=1;j<=(2*i-2);j++)
{
    cout<<" ";
}
for(j=i;j<=N;j++)
{
    cout<<"*";

}
cout<<"\n";
}
for(i=1;i<=N;i++)
{
    for(j=1;j<=i;j++)
    {
        cout<<"*";
    }
    for(j=(2*i-2);j<(2*N-2);j++)
    {
        cout<<" ";
    }
    for(j=1;j<=i;j++)
    {
        cout<<"*";
    }
    cout<<"\n";
}

}

sir plz take my doubt

hi @gamingzone123a_2a8bc985f4c429d5,
sorry i missed this doubt …updated https://ide.codingblocks.com/s/666879

sir code giving same output which we want but after submitting it it gives me wrong answer in hallow diamond pattern code

Then I write another code of same example :- https://ide.codingblocks.com/s/666888

hi @gamingzone123a_2a8bc985f4c429d5 the code i gave is working fine please try again https://ide.codingblocks.com/s/666879