Test Case Failed

#include
using namespace std;
int main() {
int n,m;
cin>>m>>n;
int a[m][n];
for(int i=0;i<m;i++)
{
for(int j=0;j<n;j++)
{
cin>>a[i][j];
}
}
int sc=0;
while(sc<=n-1)
{
for(int i=0;i<m;i++)
{
cout<<a[i][sc]<<", β€œ;
}
sc++;
for(int i=m-1;i>=0;i–)
{
cout<<a[i][sc]<<”, ";
}
sc++;
}
cout<<β€œEND”;
}

I am failing 2 test cases please help me understand why

Hello @Abhay-Chauhan-1546158815521966 please share your code by saving it on ide.codingblocks.com

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.