Manmohan Loves Patterns- II

#include
using namespace std;

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

}
there are present any different approach of this question except this

@khemchandrs I request you to paste your code in ide.codingblocks.com , save it and then send the link.

@khemchandrs try the approach given in the following link :