Challenges - Pattern with Zeroes

I have submitted the correct code and still it is saying “all test cases are failed”.

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

		else{
			cout<<0;
		}

	}

}
return 0;

}

I am still nat able to understand what is the issue

I am still nat able to submit the code it is saying test cases are failed