In this question, my code is printing the right output for all the inputs I have tried in it. But when I’m trying to submit it shows the Wrong Answer. Please help me with the code!
#include
using namespace std;
int main(){
int N;
cin>>N;
if(N<=20){
for(int i=1;i<=N;i++){
for(int j=N-i;j>=0;j–)
cout<<" “;
for(int x=1;x<=N;x++){
if(i==1||i==N)
cout<<”";
else{
if(x==1||x==N)
cout<<"";
else
cout<<" ";
}
}
cout<<endl;
}
}
return 0;
}