This is the code I used to solve the problem of printing pattern in video 22, can you explain why it did not work (code in inverted commas)
1
123
12345
1234567
"#include
using namespace std;
int main()
{
int N;
cout<<"enter N ";
cin>>N;
int j;
for (int i=1;i<=N;i=i+1){
for(j=1;j<=N-i;j=j+1){
cout<<' ';
}
for(int k=1;k=2*i-1;k=k+1){
cout<<k;
}
cout<<endl;
}
return 0;
} "