Pattern mountain

#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 ;
}
for( int k=1; k<=2*(n-i)-1 ; k++ ){
cout<<" ";
}
if ( i ==n ){
for(int m=i-1; m>0 ; m–){
cout<<m ;
}
}
else
for ( int l=i; l>0; l–){
cout <<l;
}
cout<<endl;
}

return 0;

}

Please tell the mistake in my code .

hi grahil
save ur code to online ide of coding block and then post the link here

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.