I tried to solve this problem but I am unable print pattern properly please help me . I tried to code from what I thought was right but it was wrong . This is my code:
int main()
{
int n,i,j;
cin>>n;
for(i=1;i<n;i++){
for(j=1;j<i;j++){
cout<<j;
for(int k=n-1;k>=0;k--){
cout<<"\t";
}
cout<<j;
cout<<endl;
}
}
return 0;
}