what is the problem in my code?please explain
#include
using namespace std;
main()
{
int a[50][50];
int i,j,r,c;
cin>>r>>c;
for(i=0;i<r;i++)
{ for(j=0;j<c;j++)
{
cin>>a[i][j];
}
}
for(j=0;j<c;j++)
{
if(j%2==0)
{
for(i=0;i<r;i++)
{
cout<<a[i][j]<<" “;
}
}
if(j%2!=0 or j==1)
{
for(i=r-1;i>=0;i–)
{
cout<<a[i][j];
cout<<” ";
}
}
}
}