Pattern with zeroes

my code is giving same output as custom output but when i submit it ,it is giving wrong answer

#include
using namespace std;
int main() {
int n;
cin>>n;
for(int i=1;i<=n;i++){
for(int j=1;j<=i;j++){
if((j==1)||(j==i)){
cout<<i;
}
else{
cout<<“0”;
}
}
cout<<endl;
}
return 0;
}

Hi Arshiya
Save your code to online ide of coding block and then post the link here…

i have resolved my problem thanks for your reply

Ok thats good …
Mark ur doubt resolved and gave feedback…
Happy coding.