Test Case error is shown while my code is running accurately in my editor

Please check my code
Here is my code:

#include
using namespace std;

int main ()
{
int N;
cin>>N;

int i , j;

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

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

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

}

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

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

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

}
return 0;

}

this is because you are printing 10 columns but in the sample output you can see there are only 9 columns

you can check this code

What is wrong in my code I am just a beginner. Can you please elaborate what do you mean by 9 columns and 10 columns


join this
|

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

@sinchan1509_1a917d7b6cc3cbb9

plz give your feedback from above link

Already given the feedback