Spiral print anticlockwise

my code is working fine but none of the test cases are working. here is the code: https://ide.codingblocks.com/s/316849

Hey @vketan182
Correction is on line 18 if(ec>=sc)
and line 24 if(er>=sr)

Still none of test cases are passing

Hey @vketan182
One more change
int ec=m-1;
int er=n-1;
Initially, they are reversed.