Pattern mountain (progg. funda)

whats wrong with my code??
#include
using namespace std;

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

int i,j;

for(i=1;i<=n;i++)
{

for(j=1;j<=(2*n-1);j++)
{

if(j<=i)
cout<<j+" ";

else if((i+j)>=2*n)
  cout<<(2*n-j)+" ";


 else
 cout<<" ";

}
cout<<endl;

}

return 0;

}

Hey Aashish, your code is completely wrong, what are you trying to print in these 2 lines??
cout<<j+" “;
cout<<(2*n-j)+” ";

Yes sir. I did the rough work required before implementing. This code did work on terminal.

can you send the pattern which you are trying to make? or link to question

https://hack.codingblocks.com/practice/p/341/174

https://ide.codingblocks.com/s/46093
try this