Arrays wave print column wise

#include
using namespace std;
int main() {int a,b;
cin>>a>>b;
if(a>1 && a<10 && b>1 && b<10)
{int array1[a][b];
for(int j=0;j<a;j++)
{
for(int k=0;k<b;k++)
{
cin>>array1[j][k];
}
}int k=0,j=0;
while(j!=a)
{
for(;k<b;k++)
{
cout<<" β€œ<<array1[k][j]<<”,";

	}k--;j++;
	if(j==a)
	break;
	for(;k>=0;k--)
	{
		cout<<" "<<array1[k][j]<<",";
	}k++;j++;
	
}cout<<" END";

}
return 0;
}

pls suggest the mistake

Can you plz send your code by saving on ide, so that I could tell your mistake…