Patterns and stars - 1

#include
using namespace std;
int main()
{
int n,j,i;
cin>>n;
for(i=n;i>=1;i–)
{
for(j=1;j<=i;j++)
{
cout<<j;
}

	for(int k=n;k>=j;k--)
	{
		cout<<"*";
	}
	for(int l=1;l<=n-i-1;l++)
	{
		cout<<"*";
	}
	cout<<endl;
}

}

only last 2 test cases passed … any corrections ???
thou i put very basic approach in that…so…

hello @ManasxCOdE
please save ur code here -> https://ide.codingblocks.com/ and share the link with me.