Hollow rhombus pattern question. getting correct output but answer still showing wrong. why?

#include
using namespace std;
int main() {
int n;
cin>>n;
if(n<=20){
for(int i=0;i<n; i++){
for(int j=0;j<n-i;j++){
cout<<" β€œ;
}
cout<<”";
if(i==0 || i==n-1){
for(int k=0;k<n-2;k++){
cout<<"
";

	}

}
else{ for(int nosib =0; nosib< n-2;nosib++) {
cout<<" ";
}

}

cout<<"*";

cout<<endl;

}
}
return 0;

}

you are doing one mistake at line no. 9 is that you are providing one extra space which is not need in output so, the correct statement is :

   for(int j=0;j<(n-i-1);j++){     
                    cout<<" ";
                }

Your Modified Code:

still the answer isbeing marked asw wrong on the website

check once again bcz in my machine it’s passing all test cases.