Mountain Pattern

sir I am not able to make the second pattern :
#include
using namespace std;
int main()
{
int n;
cin>>n;
for(int i=1;i<=n;i++)
{
for(int j=1;j<=i;j++)
{
cout<<j<<"\t";
}
for(int k=1;k<(n-i);k++)
{
cout<<" ";

	}
	for(int j=i;j>=0;j--)
	{
		cout<<j<<"\t";
	}
	cout<<endl;
}

return 0;

}

hi Megha, look at it this way, you have to print 4 lines,
in each line, there are some numbers, some spaces, and then again some numbers
the numbers are equivalent to the line number, which you have already figured out. now you just have to find the number of spaces in each line (try to find a relationship with the line number)

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.