No and stars problem

sir I am not able to remove the first and last star row which is extra .Please correct my code:
#include
using namespace std;
int main()
{
int n ;
cin>>n;
for(int i=0;i<=n;i++)
{
for(int j=1;j<=(n-i);j++)
{
cout<<j;
}
for(int k=0;k!=((2i)+1);k++)
{
cout<<"
";
}

	cout<<endl;
}

return 0;

}

Hi @Megha2468,
Please try to share code using ide.codingblocks.com from next time onwards.

Here is the corrected code


Hope dis resolves ur doubt.